Commit 0c082565 authored by Andrew Kelley's avatar Andrew Kelley Committed by Janne Grunau

asfdec: short-circuit seeking to the start of stream

Bug-id: 43
Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent 0ebb523f
...@@ -1465,6 +1465,13 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, ...@@ -1465,6 +1465,13 @@ static int asf_read_seek(AVFormatContext *s, int stream_index,
return ret; return ret;
} }
/* explicitly handle the case of seeking to 0 */
if (!pts) {
asf_reset_header(s);
avio_seek(s->pb, s->data_offset, SEEK_SET);
return 0;
}
if (!asf->index_read) if (!asf->index_read)
ret = asf_build_simple_index(s, stream_index); ret = asf_build_simple_index(s, stream_index);
......
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