summaryrefslogtreecommitdiff
path: root/libavformat/oggdec.c
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-02-04 21:04:19 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-02-05 14:21:16 +0100
commit8162c6f0bdd8730ff04df5b6b38957215106fd35 (patch)
tree2c887dfeda6aadd2795e8e36e85f64081b38a251 /libavformat/oggdec.c
parent1b0dc96fc98f29fbd0d8d4bd8335982e5d47f2c8 (diff)
oggdec: add missing ogg_reset on seek.
It would never be called when the searched-for position was already in the index. In the other cases, the ogg_reset at the end of the read_timestamp function handled it. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavformat/oggdec.c')
-rw-r--r--libavformat/oggdec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 9e6832b61f..ab71b39556 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -671,6 +671,10 @@ static int ogg_read_seek(AVFormatContext *s, int stream_index,
struct ogg_stream *os = ogg->streams + stream_index;
int ret;
+ // Ensure everything is reset even when seeking via
+ // the generated index.
+ ogg_reset(ogg);
+
// Try seeking to a keyframe first. If this fails (very possible),
// av_seek_frame will fall back to ignoring keyframes
if (s->streams[stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO