[MPlayer-dev-eng] Fix NULL pointer dereference when audio filter fails

Lasse Kärkkäinen tronic at trn.iki.fi
Sun Apr 20 12:33:23 CEST 2008


Meihui Fan wrote:
> I've found this bug a few days ago.
> I also dug into it and got a real fix.

Your patch doesn't fix the problem that I am seeing:

AO: [alsa] 44100Hz 2ch ac3 (1 bytes per sample)
[format] Sample format big-endian AC3 not yet supported
Couldn't find matching filter/ao format!
Starting playback...
==30620==
==30620== Invalid read of size 8
==30620==    at 0x4774E0: af_calc_filter_multiplier (af.c:540)
==30620==    by 0x4D3F76: decode_audio (dec_audio.c:431)
==30620==    by 0x44E72A: main (mplayer.c:2041)
==30620==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

(this is with your patch applied)

Background: the reason why filtering fails is that the movie has 48 kHz
AC3 but my sound card only supports 44.1 kHz SR, so libao tries to do a
samplerate conversion, but it doesn't know how to do that for AC3, so
the filter initialization fails.




More information about the MPlayer-dev-eng mailing list