mirror of https://git.ffmpeg.org/ffmpeg.git
lavf/utils: correct the duration estimation method for nut demuxer
in fact, nut demuxer use the PTS for duration estimation. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
12e6057fb0
commit
541c635628
|
@ -2956,7 +2956,11 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset)
|
||||||
/* at least one component has timings - we use them for all
|
/* at least one component has timings - we use them for all
|
||||||
* the components */
|
* the components */
|
||||||
fill_all_stream_timings(ic);
|
fill_all_stream_timings(ic);
|
||||||
ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
|
/* nut demuxer estimate the duration from PTS */
|
||||||
|
if(!strcmp(ic->iformat->name, "nut"))
|
||||||
|
ic->duration_estimation_method = AVFMT_DURATION_FROM_PTS;
|
||||||
|
else
|
||||||
|
ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM;
|
||||||
} else {
|
} else {
|
||||||
/* less precise: use bitrate info */
|
/* less precise: use bitrate info */
|
||||||
estimate_timings_from_bit_rate(ic);
|
estimate_timings_from_bit_rate(ic);
|
||||||
|
|
Loading…
Reference in New Issue