mmf: simplify code by using FFMIN

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-11-24 14:27:01 +00:00
parent 7f321fca23
commit 05b02e9c0f

View File

@ -271,9 +271,7 @@ static int mmf_read_packet(AVFormatContext *s,
if (url_feof(s->pb) || !mmf->data_size)
return AVERROR_EOF;
size = MAX_SIZE;
if(size > mmf->data_size)
size = mmf->data_size;
size = FFMIN(MAX_SIZE, mmf->data_size);
ret = av_get_packet(s->pb, pkt, size);
if (ret < 0)