diff options
author | John Stebbins <stebbins@jetheaddev.com> | 2017-01-11 12:17:06 -0700 |
---|---|---|
committer | John Stebbins <stebbins@jetheaddev.com> | 2017-02-19 21:03:09 -0700 |
commit | 42cf7f91f1e9dabf494ff469d8f67ac8b33b0f63 (patch) | |
tree | d95be8bac17ce80513dde78d1a0d321b5a7750a4 | |
parent | 7cb9296db872c4221453e5411f242ebcfca62664 (diff) | |
download | ffmpeg-42cf7f91f1e9dabf494ff469d8f67ac8b33b0f63.tar.gz |
dv: Don't return EIO upon EOF
-rw-r--r-- | libavformat/dv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c index d4e51807d7..748b5e8926 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -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); } |