aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-11 16:42:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-11 16:43:27 +0200
commitc6c172d1738b187fda1ad80cec357910be01ff58 (patch)
tree56359a8219a630b72cc2b3c4e1d30de285669329 /libavformat/utils.c
parentc9d64abedfc2f69968d48da89aea9e1184a128d5 (diff)
downloadffmpeg-c6c172d1738b187fda1ad80cec357910be01ff58.tar.gz
avformat/mpegts: skip updating programs/streams when determining duration
Fixes Ticket2441 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index b25576e7cb..3afe488f10 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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];