Mercurial > mplayer.hg
changeset 20334:5fcc8a3b1e88
Try playing files with wrong wav header length, fixes riff_broken_hrdlen.wav
(bug #238)
author | reimar |
---|---|
date | Sat, 21 Oct 2006 19:58:49 +0000 |
parents | 7f84082900a3 |
children | fccaabde1978 |
files | libmpdemux/demux_audio.c |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Sat Oct 21 19:34:06 2006 +0000 +++ b/libmpdemux/demux_audio.c Sat Oct 21 19:58:49 2006 +0000 @@ -411,13 +411,11 @@ l = stream_read_dword_le(s); if(l < 16) { mp_msg(MSGT_DEMUX,MSGL_ERR,"[demux_audio] Bad wav header length: too short (%d)!!!\n",l); - free_sh_audio(demuxer, 0); - return 0; + l = 16; } if(l > MAX_WAVHDR_LEN) { mp_msg(MSGT_DEMUX,MSGL_ERR,"[demux_audio] Bad wav header length: too long (%d)!!!\n",l); - free_sh_audio(demuxer, 0); - return 0; + l = 16; } sh_audio->wf = w = malloc(l > sizeof(WAVEFORMATEX) ? l : sizeof(WAVEFORMATEX)); w->wFormatTag = sh_audio->format = stream_read_word_le(s);