[MPlayer-dev-eng] [PATCH] Fix segfault in libmpcodecs/ad_imaadpcm.c

Craig Shelley craig at microtron.org.uk
Sun May 10 03:44:00 CEST 2009


Hi,

The attached patch fixes a segfault observed while playing mono ADPCM
audio.

gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb62256d0 (LWP 23909)]
0x0813f3ef in decode_nibbles (output=0xa76d4b0, output_size=1016,
channels=1, predictor=0xbfebbf24, index=0xbfebbf1c) at
libmpcodecs/ad_imaadpcm.c:137
137	  step[1] = adpcm_step[index[1]];
(gdb) bt
#0  0x0813f3ef in decode_nibbles (output=0xa76d4b0, output_size=1016,
channels=1, predictor=0xbfebbf24, index=0xbfebbf1c) at
libmpcodecs/ad_imaadpcm.c:137
#1  0x0813f6e0 in ms_ima_adpcm_decode_block (output=0xa76d4b0,
input=0xa76cf90 "��%", channels=1, block_size=508) at
libmpcodecs/ad_imaadpcm.c:267
#2  0x0813f8a4 in decode_audio (sh_audio=0xa73b858, buf=0xa76d4b0
"\017", minlen=6928, maxlen=72976) at libmpcodecs/ad_imaadpcm.c:322
#3  0x0814052b in decode_audio (sh_audio=0xa73b858, minlen=7706) at
libmpcodecs/dec_audio.c:372
#4  0x080ae8f2 in main (argc=2, argv=0xbfebd2b4) at mplayer.c:2040
(gdb) p index[1]
$1 = -1075068956
(gdb) p index[0]
$2 = 37


-- 
Craig Shelley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer_adpcm_mono_fix.patch
Type: text/x-patch
Size: 478 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090510/304b3ac6/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090510/304b3ac6/attachment.pgp>


More information about the MPlayer-dev-eng mailing list