mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 21:45:10 +00:00
mmf: simplify code by using FFMIN
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
7f321fca23
commit
05b02e9c0f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user