[FFmpeg-soc] [soc]: r2108 - aac/aac.c
andoma
subversion at mplayerhq.hu
Wed Apr 9 09:41:26 CEST 2008
Author: andoma
Date: Wed Apr 9 09:41:25 2008
New Revision: 2108
Log:
Make sure there is enough space in PCM output buffer before writing there.
Modified:
aac/aac.c
Modified: aac/aac.c
==============================================================================
--- aac/aac.c (original)
+++ aac/aac.c Wed Apr 9 09:41:25 2008
@@ -2158,7 +2158,11 @@ static int output_samples(AVCodecContext
}
}
- *data_size = 1024 * avccontext->channels * sizeof(uint16_t);
+ i = 1024 * avccontext->channels * sizeof(uint16_t);
+ if(*data_size < i)
+ return -1;
+ *data_size = i;
+
ac->dsp.float_to_int16(data, ac->interleaved_output, 1024 * avccontext->channels);
return 0;
}
More information about the FFmpeg-soc
mailing list