Commit e6a045ba authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cebbaf57
......@@ -950,6 +950,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment