[FFmpeg-devel] [PATCH] matroskadec: reset num_levels on seek.

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Feb 12 14:08:05 CET 2012


Otherwise when we run into levels beyond the max. allowed
playback will be permanently broken.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
---
 libavformat/matroskadec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index df54762..5c1cc87 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2067,6 +2067,7 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
     matroska->skip_to_keyframe = !(flags & AVSEEK_FLAG_ANY);
     matroska->skip_to_timecode = st->index_entries[index].timestamp;
     matroska->done = 0;
+    matroska->num_levels = 0;
     ff_update_cur_dts(s, st, st->index_entries[index].timestamp);
     return 0;
 }
-- 
1.7.9



More information about the ffmpeg-devel mailing list