diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-28 10:06:52 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-02-28 10:06:52 +0000 |
commit | d1acb189028448087cee36a78d0b64b024422966 (patch) | |
tree | 1f1024a6c59c6cbbceb484668b10db288ea8e7e8 /libfaad2/specrec.c | |
parent | 3a81bf82a0415753790c8fc09e8020d6e0e22f67 (diff) | |
download | mpv-d1acb189028448087cee36a78d0b64b024422966.tar.bz2 mpv-d1acb189028448087cee36a78d0b64b024422966.tar.xz |
Fix a possible NULL-pointer crash introduced by local changes to libfaad2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28757 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libfaad2/specrec.c')
-rw-r--r-- | libfaad2/specrec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libfaad2/specrec.c b/libfaad2/specrec.c index 1119dd3b53..d4d600916f 100644 --- a/libfaad2/specrec.c +++ b/libfaad2/specrec.c @@ -847,7 +847,8 @@ uint8_t reconstruct_single_channel(NeAACDecHandle hDecoder, ic_stream *ics, output_channels = 1; #endif - if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] < output_channels) { + if (hDecoder->element_alloced[hDecoder->fr_ch_ele] == 0 || + hDecoder->element_output_channels[hDecoder->fr_ch_ele] < output_channels) { hDecoder->element_output_channels[hDecoder->fr_ch_ele] = output_channels; retval = allocate_single_channel(hDecoder, sce->channel, output_channels); if (retval > 0) |