diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-12 19:16:16 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-12 19:16:16 +0400 |
commit | f73901f815d0c6e1e9dbe6d8541e43d633b06d63 (patch) | |
tree | 4071c87ee47d8056cdd20bd8fe8a49d523e3ddf5 /libavformat/asfdec.c | |
parent | 5634c9518f07b6767894b8a9556a8c8527c207b2 (diff) | |
parent | 0c082565965258dca143767cc6cb25e38b6e9ea3 (diff) |
Merge commit '0c082565965258dca143767cc6cb25e38b6e9ea3'
* commit '0c082565965258dca143767cc6cb25e38b6e9ea3':
asfdec: short-circuit seeking to the start of stream
Conflicts:
libavformat/asfdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/asfdec.c')
-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 8d6de4a256..4db908d3d9 100644 --- a/libavformat/asfdec.c +++ b/libavformat/asfdec.c @@ -1538,6 +1538,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); if (ret < 0) |