summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-21 10:48:39 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-22 09:14:05 +0200
commit721113bed22e51dca52bc1a486b7c24be9d3b52d (patch)
tree1fd450ffbb7377c60c90c9487cab310025724148 /libavformat
parenta8a2271fe0bda50a573cdd287bf644ecff1a61c9 (diff)
matroskadec: return more correct error code on read error.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
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 */