mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
1b0dc96fc9
commit
8162c6f0bd
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user