diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-05-07 09:39:10 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-05-11 12:00:54 +0200 |
commit | 77a2f4cbcfc3ca29e128e830622fc8b6fc7676f6 (patch) | |
tree | 9a53b0335d0de8a199af52870c3415768cdd5941 | |
parent | 7f8b55b560bb76f84baa909cdc683eeba47c923d (diff) | |
download | ffmpeg-77a2f4cbcfc3ca29e128e830622fc8b6fc7676f6.tar.gz |
oma: properly forward errors in oma_read_packet
Prevent spurios EIO on EOF.
CC:libav-stable@libav.org
(cherry picked from commit db9aee6ccf183508835acc325f5ad87d595eacc4)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
-rw-r--r-- | libavformat/omadec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/omadec.c b/libavformat/omadec.c index f6b6f13de6..cd255c1704 100644 --- a/libavformat/omadec.c +++ b/libavformat/omadec.c @@ -381,8 +381,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; |