---
libavformat/dv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/libavformat/dv.c b/libavformat/dv.c
index d4e5180..3ff369b 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -484,10 +484,15 @@ static int dv_read_packet(AVFormatContext *s, AVPacket
*pkt)
size = avpriv_dv_get_packet(c->dv_demux, pkt);
if (size < 0) {
+ int result;
+
if (!c->dv_demux->sys)
return AVERROR(EIO);
size = c->dv_demux->sys->frame_size;
- if (avio_read(s->pb, c->buf, size) <= 0)
+ result = avio_read(s->pb, c->buf, size);
+ if (result == AVERROR_EOF)
+ return result;
+ if (result <= 0)
return AVERROR(EIO);
size = avpriv_dv_produce_packet(c->dv_demux, pkt, c->buf, size);
--
2.9.3
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel