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>
This commit is contained in:
parent
cebbaf578d
commit
e6a045ba56
@ -950,6 +950,8 @@ static int read_seek(AVFormatContext *s, int stream_index,
|
|||||||
|
|
||||||
if (st->index_entries) {
|
if (st->index_entries) {
|
||||||
int index = av_index_search_timestamp(st, pts, flags);
|
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)
|
if (index < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user