[FFmpeg-cvslog] mmf: simplify code by using FFMIN
Paul B Mahol
git at videolan.org
Sat Nov 24 15:59:26 CET 2012
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Nov 24 14:27:01 2012 +0000| [05b02e9c0f2fc33f61f75ae3977fd2cd0e6b81e3] | committer: Paul B Mahol
mmf: simplify code by using FFMIN
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05b02e9c0f2fc33f61f75ae3977fd2cd0e6b81e3
---
libavformat/mmf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index b985baa..38c6970 100644
--- a/libavformat/mmf.c
+++ b/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)
More information about the ffmpeg-cvslog
mailing list