projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cebbaf5
)
nutdec: Flip the direction for seeking with an index in the failure case.
author
Michael Niedermayer
<michaelni@gmx.at>
Sun, 19 Aug 2012 21:30:27 +0000
(23:30 +0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sun, 26 Aug 2012 20:15:18 +0000
(22:15 +0200)
This is closer to how seeking works without an index
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c
patch
|
blob
|
history
diff --git
a/libavformat/nutdec.c
b/libavformat/nutdec.c
index
ba3eb85
..
3389c79
100644
(file)
--- 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;