From 2594c8a462fc28919871800fa4c08f6af00ea747 Mon Sep 17 00:00:00 2001 From: reimar Date: Tue, 10 Aug 2004 20:13:44 +0000 Subject: [PATCH] do not attempt to seek backward in stream on MDPR chunk with no codec data git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12993 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_real.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c index 14658c7693..6d1d9e6ed1 100644 --- a/libmpdemux/demux_real.c +++ b/libmpdemux/demux_real.c @@ -1044,6 +1044,11 @@ void demux_open_real(demuxer_t* demuxer) codec_data_size = stream_read_dword(demuxer->stream); codec_pos = stream_tell(demuxer->stream); + if (!codec_data_size) { + mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_real: no codec data in MDPR chunk at fpos=0x%X\n", codec_pos); + break; + } + tmp = stream_read_dword(demuxer->stream); mp_msg(MSGT_DEMUX,MSGL_DBG2,"demux_real: type_spec: len=%d fpos=0x%X first_dword=0x%X (%.4s) \n",