Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinzheng Zhang <zhangxzheng@gmail.com>2016-09-14 11:13:45 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-14 16:50:07 +0300
commitecc04b4f2f29ac676e6c1d1ebf20ec45f5385f1e (patch)
tree5cd6d5cf2b7dbd6722f2ea24298ed88d5ec7e878 /libavformat
parentc8528e54e57810535b94ccecbc9c711d67dd710f (diff)
avformat/utils: fix timebase error in avformat_seek_file()
When there is only one stream and stream_index has not specified, The ts has been transferd by the timebase of stream0 without modifying the stream_index In this condation it cause seek failure. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cbaeef0d68..d605a969a9 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2418,6 +2418,7 @@ int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts,
max_ts = av_rescale_rnd(max_ts, time_base.den,
time_base.num * (int64_t)AV_TIME_BASE,
AV_ROUND_DOWN | AV_ROUND_PASS_MINMAX);
+ stream_index = 0;
}
ret = s->iformat->read_seek2(s, stream_index, min_ts,