[FFmpeg-cvslog] zmbv: return more meaningful error codes.

Anton Khirnov git at videolan.org
Mon Jan 7 00:03:28 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Nov 15 18:18:12 2012 +0100| [aaf208329f6ed21f51d7bcfa6b50ea41e0825c4e] | committer: Anton Khirnov

zmbv: return more meaningful error codes.

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

 libavcodec/zmbv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 0733fa7..8e0db8b 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -485,7 +485,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
         zret = inflateReset(&c->zstream);
         if (zret != Z_OK) {
             av_log(avctx, AV_LOG_ERROR, "Inflate reset error: %d\n", zret);
-            return -1;
+            return AVERROR_UNKNOWN;
         }
 
         tmp = av_realloc(c->cur,  avctx->width * avctx->height * (c->bpp / 8));
@@ -639,7 +639,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
     zret = inflateInit(&c->zstream);
     if (zret != Z_OK) {
         av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret);
-        return -1;
+        return AVERROR_UNKNOWN;
     }
 
     return 0;



More information about the ffmpeg-cvslog mailing list