mmf: simplify code by using FFMIN

Signed-off-by: Paul B Mahol <onemda@gmail.com>
pull/8/head
Paul B Mahol 12 years ago
parent 7f321fca23
commit 05b02e9c0f
  1. 4
      libavformat/mmf.c

@ -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…
Cancel
Save