mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 01:40:04 +01:00
avformat/mpegts: skip updating programs/streams when determining duration
Fixes Ticket2441 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2500,6 +2500,7 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
|
||||
}
|
||||
}
|
||||
|
||||
av_opt_set(ic, "skip_changes", "1", AV_OPT_SEARCH_CHILDREN);
|
||||
/* estimate the end time (duration) */
|
||||
/* XXX: may need to support wrapping */
|
||||
filesize = ic->pb ? avio_size(ic->pb) : 0;
|
||||
@@ -2567,6 +2568,8 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
|
||||
offset &&
|
||||
++retry <= DURATION_MAX_RETRY);
|
||||
|
||||
av_opt_set(ic, "skip_changes", "0", AV_OPT_SEARCH_CHILDREN);
|
||||
|
||||
/* warn about audio/video streams which duration could not be estimated */
|
||||
for (i = 0; i < ic->nb_streams; i++) {
|
||||
st = ic->streams[i];
|
||||
|
||||
Reference in New Issue
Block a user