1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

dv: Don't return EIO upon EOF

This commit is contained in:
John Stebbins 2017-01-11 12:17:06 -07:00
parent 7cb9296db8
commit 42cf7f91f1

View File

@ -484,11 +484,14 @@ static int dv_read_packet(AVFormatContext *s, AVPacket *pkt)
size = avpriv_dv_get_packet(c->dv_demux, pkt);
if (size < 0) {
int ret;
if (!c->dv_demux->sys)
return AVERROR(EIO);
size = c->dv_demux->sys->frame_size;
if (avio_read(s->pb, c->buf, size) <= 0)
return AVERROR(EIO);
ret = avio_read(s->pb, c->buf, size);
if (ret <= 0)
return ret;
size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size);
}