mirror of https://git.ffmpeg.org/ffmpeg.git
av_find_stream_info: skip flushing codecs and estimating timings if probe_size==0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
703f294934
commit
da62b4326b
|
@ -2494,7 +2494,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
|
||||||
AVPacket pkt1, *pkt;
|
AVPacket pkt1, *pkt;
|
||||||
int64_t old_offset = avio_tell(ic->pb);
|
int64_t old_offset = avio_tell(ic->pb);
|
||||||
int orig_nb_streams = ic->nb_streams; // new streams might appear, no options for those
|
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)
|
if(ic->pb)
|
||||||
av_log(ic, AV_LOG_DEBUG, "File position before avformat_find_stream_info() is %"PRId64"\n", avio_tell(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);
|
estimate_timings(ic, old_offset);
|
||||||
|
|
||||||
compute_chapters_end(ic);
|
compute_chapters_end(ic);
|
||||||
|
|
Loading…
Reference in New Issue