Mercurial > libavcodec.hg
changeset 6689:85cb0c3f8e54 libavcodec
simplify using FFMIN3
author | bcoudurier |
---|---|
date | Sat, 26 Apr 2008 12:51:52 +0000 |
parents | 91f5a23d6cd5 |
children | 36e1f34d5428 |
files | mpegaudiodec.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegaudiodec.c Sat Apr 26 12:39:45 2008 +0000 +++ b/mpegaudiodec.c Sat Apr 26 12:51:52 2008 +0000 @@ -2581,12 +2581,9 @@ 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);