diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-05-07 11:39:10 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-05-07 16:37:32 +0400 |
commit | db9aee6ccf183508835acc325f5ad87d595eacc4 (patch) | |
tree | 3b200d8fb0584ec9373d008cf3be11c805d9feba /libavformat/omadec.c | |
parent | 6f98508e2b86dcb79614d8c9b8e97c5e83a21cb0 (diff) |
oma: properly forward errors in oma_read_packet
Prevent spurios EIO on EOF.
CC:libav-stable@libav.org
Diffstat (limited to 'libavformat/omadec.c')
-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 06b6bc6966..9452c61792 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; |