[FFmpeg-cvslog] mmf: signal EOF

Paul B Mahol git at videolan.org
Sat Nov 24 15:59:25 CET 2012


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Nov 24 14:24:13 2012 +0000| [7f321fca23597e23a577b84e71a20128def9a7d7] | committer: Paul B Mahol

mmf: signal EOF

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7f321fca23597e23a577b84e71a20128def9a7d7
---

 libavformat/mmf.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index e77137f..b985baa 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;



More information about the ffmpeg-cvslog mailing list