[FFmpeg-cvslog] oma: properly forward errors in oma_read_packet

Luca Barbato git at videolan.org
Wed May 8 13:55:15 CEST 2013


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Tue May  7 09:39:10 2013 +0200| [db9aee6ccf183508835acc325f5ad87d595eacc4] | committer: Luca Barbato

oma: properly forward errors in oma_read_packet

Prevent spurios EIO on EOF.

CC:libav-stable at libav.org

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

 libavformat/omadec.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 06b6bc6..9452c61 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -395,8 +395,10 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
     int packet_size = s->streams[0]->codec->block_align;
     int ret = av_get_packet(s->pb, pkt, packet_size);
 
-    if (ret <= 0)
-        return AVERROR(EIO);
+    if (ret < 0)
+        return ret;
+    if (!ret)
+        return AVERROR_EOF;
 
     pkt->stream_index = 0;
 



More information about the ffmpeg-cvslog mailing list