aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-25 17:39:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-25 17:39:25 +0200
commitda62b4326b18b9e9cc7dae2467c23a71ab61b47a (patch)
tree412720e5694d3b80888362e425d15618137e3ea7 /libavformat
parent703f2949344b88ca5e43b8122925388860b23cd6 (diff)
downloadffmpeg-da62b4326b18b9e9cc7dae2467c23a71ab61b47a.tar.gz
av_find_stream_info: skip flushing codecs and estimating timings if probe_size==0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 5759f94838..caa8c4b528 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);