[FFmpeg-cvslog] r11254 - trunk/libavformat/utils.c

reimar subversion
Mon Dec 17 20:12:43 CET 2007


Author: reimar
Date: Mon Dec 17 20:12:43 2007
New Revision: 11254

Log:
Simplify av_close_input_file similarly to av_open_input_file previously


Modified:
   trunk/libavformat/utils.c

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	(original)
+++ trunk/libavformat/utils.c	Mon Dec 17 20:12:43 2007
@@ -2041,7 +2041,7 @@ int av_read_pause(AVFormatContext *s)
 
 void av_close_input_file(AVFormatContext *s)
 {
-    int i, must_open_file;
+    int i;
     AVStream *st;
 
     /* free previous packet */
@@ -2068,13 +2068,8 @@ void av_close_input_file(AVFormatContext
         av_freep(&s->programs[i]);
     }
     flush_packet_queue(s);
-    must_open_file = 1;
-    if (s->iformat->flags & AVFMT_NOFILE) {
-        must_open_file = 0;
-    }
-    if (must_open_file) {
+    if (!(s->iformat->flags & AVFMT_NOFILE))
         url_fclose(s->pb);
-    }
     av_freep(&s->priv_data);
     av_free(s);
 }




More information about the ffmpeg-cvslog mailing list