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:
Michael Niedermayer 2012-08-19 23:30:27 +02:00
parent cebbaf578d
commit e6a045ba56

View File

@ -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;