From 7f321fca23597e23a577b84e71a20128def9a7d7 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 24 Nov 2012 14:24:13 +0000 Subject: [PATCH] mmf: signal EOF Signed-off-by: Paul B Mahol --- libavformat/mmf.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavformat/mmf.c b/libavformat/mmf.c index e77137f290..b985baa7d2 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -268,16 +268,13 @@ static int mmf_read_packet(AVFormatContext *s, MMFContext *mmf = s->priv_data; int ret, size; - if (url_feof(s->pb)) - return AVERROR(EIO); + if (url_feof(s->pb) || !mmf->data_size) + return AVERROR_EOF; size = MAX_SIZE; if(size > mmf->data_size) size = mmf->data_size; - if(!size) - return AVERROR(EIO); - ret = av_get_packet(s->pb, pkt, size); if (ret < 0) return ret;