oma: properly forward errors in oma_read_packet

Prevent spurios EIO on EOF.

CC:libav-stable@libav.org
pull/18/head
Luca Barbato 12 years ago
parent 6f98508e2b
commit db9aee6ccf
  1. 6
      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;

Loading…
Cancel
Save