From 721113bed22e51dca52bc1a486b7c24be9d3b52d Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 21 Jul 2012 10:48:39 +0200 Subject: matroskadec: return more correct error code on read error. --- libavformat/matroskadec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/matroskadec.c') diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 40c2eb10dd..c454713eeb 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -597,8 +597,9 @@ static int ebml_read_num(MatroskaDemuxContext *matroska, AVIOContext *pb, av_log(matroska->ctx, AV_LOG_ERROR, "Read error at pos. %"PRIu64" (0x%"PRIx64")\n", pos, pos); + return pb->error ? pb->error : AVERROR(EIO); } - return AVERROR(EIO); /* EOS or actual I/O error */ + return AVERROR_EOF; } /* get the length of the EBML number */ -- cgit v1.2.3