asf: only set index_read if the index contained entries.

This allows falling back to a binary search if the file contains no
index, thus fixing seeking in such files (e.g. luckynight.wma).
This commit is contained in:
Ronald S. Bultje 2012-03-28 10:22:25 -07:00
parent a940198130
commit 44257ef426
1 changed files with 1 additions and 1 deletions

View File

@ -1235,7 +1235,7 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
last_pos=pos; last_pos=pos;
} }
} }
asf->index_read= 1; asf->index_read= ict > 0;
} }
avio_seek(s->pb, current_pos, SEEK_SET); avio_seek(s->pb, current_pos, SEEK_SET);
} }