[FFmpeg-cvslog] r10939 - trunk/libavformat/avio.c

benoit subversion
Wed Nov 7 09:34:00 CET 2007


Author: benoit
Date: Wed Nov  7 09:34:00 2007
New Revision: 10939

Log:
Check context before accessing its field.
Patch by Thorsten Jordan: tjordan macrosystem de


Modified:
   trunk/libavformat/avio.c

Modified: trunk/libavformat/avio.c
==============================================================================
--- trunk/libavformat/avio.c	(original)
+++ trunk/libavformat/avio.c	Wed Nov  7 09:34:00 2007
@@ -133,6 +133,7 @@ offset_t url_seek(URLContext *h, offset_
 int url_close(URLContext *h)
 {
     int ret;
+    if (!h) return 0; /* can happen when url_open fails */
 
     ret = h->prot->url_close(h);
     av_free(h);




More information about the ffmpeg-cvslog mailing list