diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-07-21 10:48:39 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-07-22 09:14:05 +0200 |
commit | 721113bed22e51dca52bc1a486b7c24be9d3b52d (patch) | |
tree | 1fd450ffbb7377c60c90c9487cab310025724148 | |
parent | a8a2271fe0bda50a573cdd287bf644ecff1a61c9 (diff) | |
download | ffmpeg-721113bed22e51dca52bc1a486b7c24be9d3b52d.tar.gz |
matroskadec: return more correct error code on read error.
-rw-r--r-- | libavformat/matroskadec.c | 3 |
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 */ |