diff --git a/modules/demux/smf.c b/modules/demux/smf.c index 009084f6875e03260f0de50ef59f0c8271562fa6..9839184a3920ba9834104da5f4117dcb4210f36a 100644 --- a/modules/demux/smf.c +++ b/modules/demux/smf.c @@ -665,8 +665,11 @@ static int Open (vlc_object_t *obj) if (memcmp (head, "MTrk", 4) == 0) break; - msg_Dbg (demux, "skipping unknown SMF chunk"); - vlc_stream_Read (stream, NULL, GetDWBE (head + 4)); + uint_fast32_t chunk_len = GetDWBE(head + 4); + msg_Dbg(demux, "skipping unknown SMF chunk (%"PRIuFAST32" bytes)", + chunk_len); + if (vlc_stream_Seek(stream, vlc_stream_Tell(stream) + chunk_len)) + goto error; } tr->start = vlc_stream_Tell (stream);