Commit db9aee6c authored by Luca Barbato's avatar Luca Barbato

oma: properly forward errors in oma_read_packet

Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
parent 6f98508e
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment