[FFmpeg-cvslog] r12915 - trunk/ffmpeg.c

ramiro subversion
Mon Apr 21 03:22:26 CEST 2008


Author: ramiro
Date: Mon Apr 21 03:22:25 2008
New Revision: 12915

Log:
Fix bug introduced by r12827.
If av_exit() was called after an AVFormatContext was created, but before
its file was opened, av_exit() would pass a NULL pointer to url_fclose().

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	(original)
+++ trunk/ffmpeg.c	Mon Apr 21 03:22:25 2008
@@ -380,7 +380,7 @@ static int av_exit(int ret)
         /* maybe av_close_output_file ??? */
         AVFormatContext *s = output_files[i];
         int j;
-        if (!(s->oformat->flags & AVFMT_NOFILE))
+        if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
             url_fclose(s->pb);
         for(j=0;j<s->nb_streams;j++) {
             av_free(s->streams[j]->codec);




More information about the ffmpeg-cvslog mailing list