Skip to content
Snippets Groups Projects
Commit db9aee6c authored by Luca Barbato's avatar Luca Barbato
Browse files

oma: properly forward errors in oma_read_packet

Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
parent 6f98508e
No related branches found
No related tags found
No related merge requests found
...@@ -395,8 +395,10 @@ static int oma_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment