[FFmpeg-cvslog] dv: Don't return EIO upon EOF

John Stebbins git at videolan.org
Thu Sep 28 19:40:58 EEST 2017


ffmpeg | branch: master | John Stebbins <stebbins at jetheaddev.com> | Wed Jan 11 12:17:06 2017 -0700| [42cf7f91f1e9dabf494ff469d8f67ac8b33b0f63] | committer: John Stebbins

dv: Don't return EIO upon EOF

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=42cf7f91f1e9dabf494ff469d8f67ac8b33b0f63
---

 libavformat/dv.c | 7 +++++--
 1 file 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);
     }



More information about the ffmpeg-cvslog mailing list