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:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-20 01:30:27 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-08-27 00:15:18 +0400
commite6a045ba561adf9597767fa96264429b66609b81 (patch)
tree640ac7995470c8e26ba0f7055037986e10f39e48 /libavformat/nutdec.c
parentcebbaf578d9bb68aeea969d7768aea062afa8aea (diff)
nutdec: Flip the direction for seeking with an index in the failure case.
This is closer to how seeking works without an index Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutdec.c')
-rw-r--r--libavformat/nutdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index ba3eb859f2..3389c79ba9 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -951,6 +951,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
if (st->index_entries) {
int index = av_index_search_timestamp(st, pts, flags);
if (index < 0)
+ index = av_index_search_timestamp(st, pts, flags ^ AVSEEK_FLAG_BACKWARD);
+ if (index < 0)
return -1;
pos2 = st->index_entries[index].pos;