diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-04-26 12:51:52 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-04-26 12:51:52 +0000 |
commit | 5be25fc133077c63338561dc8261c7905b4c8eeb (patch) | |
tree | a49b2b56196466c80717c8c531cce1166823ee5e | |
parent | b842ecbefce2617406a8fdb3c100f98d2300c2df (diff) | |
download | ffmpeg-5be25fc133077c63338561dc8261c7905b4c8eeb.tar.gz |
simplify using FFMIN3
Originally committed as revision 12983 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/mpegaudiodec.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 3d071627be..dcc9332970 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2581,12 +2581,9 @@ static int decode_frame_mp3on4(AVCodecContext * avctx, for (fr = 0; fr < s->frames; fr++) { start = start2; fsize = (start[0] << 4) | (start[1] >> 4); + fsize = FFMIN3(fsize, len, MPA_MAX_CODED_FRAME_SIZE); start2 += fsize; - if (fsize > len) - fsize = len; len -= fsize; - if (fsize > MPA_MAX_CODED_FRAME_SIZE) - fsize = MPA_MAX_CODED_FRAME_SIZE; m = s->mp3decctx[fr]; assert (m != NULL); |