[MPlayer-cvslog] r28757 - in trunk/libfaad2: local_changes.diff specrec.c
reimar
subversion at mplayerhq.hu
Sat Feb 28 11:06:52 CET 2009
Author: reimar
Date: Sat Feb 28 11:06:52 2009
New Revision: 28757
Log:
Fix a possible NULL-pointer crash introduced by local changes to libfaad2
Modified:
trunk/libfaad2/local_changes.diff
trunk/libfaad2/specrec.c
Modified: trunk/libfaad2/local_changes.diff
==============================================================================
--- trunk/libfaad2/local_changes.diff Sat Feb 28 09:01:52 2009 (r28756)
+++ trunk/libfaad2/local_changes.diff Sat Feb 28 11:06:52 2009 (r28757)
@@ -360,7 +360,7 @@
}
#endif
-@@ -865,22 +842,13 @@
+@@ -865,22 +842,14 @@
/* always allocate 2 channels, PS can always "suddenly" turn up */
#if (defined(PS_DEC) || defined(DRM_PS))
@@ -373,7 +373,8 @@
- if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] == 0)
- {
- /* element_output_channels not set yet */
-+ 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;
- } else if (hDecoder->element_output_channels[hDecoder->fr_ch_ele] != output_channels) {
- /* element inconsistency */
Modified: trunk/libfaad2/specrec.c
==============================================================================
--- trunk/libfaad2/specrec.c Sat Feb 28 09:01:52 2009 (r28756)
+++ trunk/libfaad2/specrec.c Sat Feb 28 11:06:52 2009 (r28757)
@@ -847,7 +847,8 @@ uint8_t reconstruct_single_channel(NeAAC
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)
More information about the MPlayer-cvslog
mailing list