[FFmpeg-cvslog] oggdec: add missing ogg_reset on seek.
Reimar Döffinger
git at videolan.org
Sun Feb 5 14:21:46 CET 2012
ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sat Feb 4 21:04:19 2012 +0100| [8162c6f0bdd8730ff04df5b6b38957215106fd35] | committer: Reimar Döffinger
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 at gmx.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8162c6f0bdd8730ff04df5b6b38957215106fd35
---
libavformat/oggdec.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 9e6832b..ab71b39 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
More information about the ffmpeg-cvslog
mailing list