# HG changeset patch # User reimar # Date 1092168824 0 # Node ID 0945a0a7ed982dc6f853ec074cfccfa27512704b # Parent 2d678d3c00fa6fe71c0a1ce457f90fb80e2eba28 do not attempt to seek backward in stream on MDPR chunk with no codec data diff -r 2d678d3c00fa -r 0945a0a7ed98 libmpdemux/demux_real.c --- a/libmpdemux/demux_real.c Tue Aug 10 17:02:02 2004 +0000 +++ b/libmpdemux/demux_real.c Tue Aug 10 20:13:44 2004 +0000 @@ -1044,6 +1044,11 @@ 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",