[FFmpeg-devel] [PATCH] avformat/matroskadec: return AVERROR(EIO) rather than AVERROR_EOF on parse error

Sophia Wang skw at google.com
Sat Jul 23 00:17:09 EEST 2016


Signed-off-by: Sophia Wang <skw at google.com>
---
 libavformat/matroskadec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index f3d701f..c536605 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -3323,7 +3323,7 @@ static int matroska_read_packet(AVFormatContext *s, AVPacket *pkt)
     while (matroska_deliver_packet(matroska, pkt)) {
         int64_t pos = avio_tell(matroska->ctx->pb);
         if (matroska->done)
-            return AVERROR_EOF;
+            return avio_feof(s->pb) ? AVERROR_EOF : AVERROR(EIO);
         if (matroska_parse_cluster(matroska) < 0)
             matroska_resync(matroska, pos);
     }
-- 
2.8.0.rc3.226.g39d4020



More information about the ffmpeg-devel mailing list