[FFmpeg-cvslog] av_find_stream_info: skip flushing codecs and estimating timings if probe_size==0

Michael Niedermayer git at videolan.org
Wed Jul 25 17:51:48 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul 25 17:39:25 2012 +0200| [da62b4326b18b9e9cc7dae2467c23a71ab61b47a] | committer: Michael Niedermayer

av_find_stream_info: skip flushing codecs and estimating timings if probe_size==0

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=da62b4326b18b9e9cc7dae2467c23a71ab61b47a
---

 libavformat/utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5759f94..caa8c4b 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2494,7 +2494,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
     AVPacket pkt1, *pkt;
     int64_t old_offset = avio_tell(ic->pb);
     int orig_nb_streams = ic->nb_streams;        // new streams might appear, no options for those
-    int flush_codecs = 1;
+    int flush_codecs = ic->probesize > 0;
 
     if(ic->pb)
         av_log(ic, AV_LOG_DEBUG, "File position before avformat_find_stream_info() is %"PRId64"\n", avio_tell(ic->pb));
@@ -2820,6 +2820,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
         }
     }
 
+    if(ic->probesize)
     estimate_timings(ic, old_offset);
 
     compute_chapters_end(ic);



More information about the ffmpeg-cvslog mailing list