diff options
author | Andrew Kelley <superjoe30@gmail.com> | 2014-02-02 23:05:58 +0000 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2014-02-12 12:52:28 +0100 |
commit | 0c082565965258dca143767cc6cb25e38b6e9ea3 (patch) | |
tree | bcf2e6ce3596859e18f523dc4ccb3d8f61190ac0 /libavformat | |
parent | 0ebb523f072322972ea446616676fff32e9603c6 (diff) | |
download | ffmpeg-0c082565965258dca143767cc6cb25e38b6e9ea3.tar.gz |
asfdec: short-circuit seeking to the start of stream
Bug-id: 43
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/asfdec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c index e754cb2d2c..8580ce0462 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -1465,6 +1465,13 @@ static int asf_read_seek(AVFormatContext *s, int stream_index, 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) ret = asf_build_simple_index(s, stream_index); |