in fact, nut demuxer use the PTS for duration estimation.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
/* at least one component has timings - we use them for all
* the components */
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 {
/* less precise: use bitrate info */
estimate_timings_from_bit_rate(ic);