[FFmpeg-cvslog] matroskadec: return more correct error code on read error.

Anton Khirnov git at videolan.org
Sun Jul 22 23:56:50 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Jul 21 10:48:39 2012 +0200| [721113bed22e51dca52bc1a486b7c24be9d3b52d] | committer: Anton Khirnov

matroskadec: return more correct error code on read error.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=721113bed22e51dca52bc1a486b7c24be9d3b52d
---

 libavformat/matroskadec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 40c2eb1..c454713 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 */



More information about the ffmpeg-cvslog mailing list