summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 42aa961a41..bb61042775 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -656,8 +656,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 */