oma: properly forward errors in oma_read_packet

Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
This commit is contained in:
Luca Barbato 2013-05-07 09:39:10 +02:00
parent 6f98508e2b
commit db9aee6ccf

View File

@ -395,8 +395,10 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt)
int packet_size = s->streams[0]->codec->block_align; int packet_size = s->streams[0]->codec->block_align;
int ret = av_get_packet(s->pb, pkt, packet_size); int ret = av_get_packet(s->pb, pkt, packet_size);
if (ret <= 0) if (ret < 0)
return AVERROR(EIO); return ret;
if (!ret)
return AVERROR_EOF;
pkt->stream_index = 0; pkt->stream_index = 0;