Commit 44257ef4 authored by Ronald S. Bultje's avatar Ronald S. Bultje

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).
parent a9401981
......@@ -1235,7 +1235,7 @@ static void asf_build_simple_index(AVFormatContext *s, int stream_index)
last_pos=pos;
}
}
asf->index_read= 1;
asf->index_read= ict > 0;
}
avio_seek(s->pb, current_pos, SEEK_SET);
}
......
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