Commit 05b02e9c authored by Paul B Mahol's avatar Paul B Mahol

mmf: simplify code by using FFMIN

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 7f321fca
...@@ -271,9 +271,7 @@ static int mmf_read_packet(AVFormatContext *s, ...@@ -271,9 +271,7 @@ static int mmf_read_packet(AVFormatContext *s,
if (url_feof(s->pb) || !mmf->data_size) if (url_feof(s->pb) || !mmf->data_size)
return AVERROR_EOF; return AVERROR_EOF;
size = MAX_SIZE; size = FFMIN(MAX_SIZE, mmf->data_size);
if(size > mmf->data_size)
size = mmf->data_size;
ret = av_get_packet(s->pb, pkt, size); ret = av_get_packet(s->pb, pkt, size);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment