diff options
author | Andreas Öman <andreas@lonelycoder.com> | 2009-01-23 12:09:32 +0000 |
---|---|---|
committer | Andreas Öman <andreas@lonelycoder.com> | 2009-01-23 12:09:32 +0000 |
commit | cf92cec7d8899ef887869628c66da30737ee54af (patch) | |
tree | b3bb20c478aad380efa29fc33b2980bf3e04a36c /libavcodec/mpegaudiodec.c | |
parent | 2d4eeaadc41a0adf97d6b71677d014833df432e2 (diff) | |
download | ffmpeg-cf92cec7d8899ef887869628c66da30737ee54af.tar.gz |
Avoid allocating MPADecodeContext on stack.
Instead move relevant fields into MPADecodeHeader and use it
where appropriate.
Originally committed as revision 16728 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index fab487edc7..080da058ed 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2277,7 +2277,7 @@ retry: goto retry; } - if (ff_mpegaudio_decode_header(s, header) == 1) { + if (ff_mpegaudio_decode_header((MPADecodeHeader *)s, header) == 1) { /* free format: prepare to compute frame size */ s->frame_size = -1; return -1; @@ -2342,7 +2342,7 @@ static int decode_frame_adu(AVCodecContext * avctx, return buf_size; } - ff_mpegaudio_decode_header(s, header); + ff_mpegaudio_decode_header((MPADecodeHeader *)s, header); /* update codec info */ avctx->sample_rate = s->sample_rate; avctx->channels = s->nb_channels; @@ -2491,7 +2491,7 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, if (ff_mpa_check_header(header) < 0) // Bad header, discard block break; - ff_mpegaudio_decode_header(m, header); + ff_mpegaudio_decode_header((MPADecodeHeader *)m, header); out_size += mp_decode_frame(m, outptr, buf, fsize); buf += fsize; len -= fsize; |