ansi: return a meaningful error code
authorAnton Khirnov <anton@khirnov.net>
Wed, 14 Nov 2012 13:29:53 +0000 (14:29 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sun, 6 Jan 2013 12:31:39 +0000 (13:31 +0100)
libavcodec/ansi.c

index 861d4e57e4921e574dca3cf6093ce268f38a1293..0b2e93d74bd29cba5196bc38b7a40289df12367a 100644 (file)
@@ -401,8 +401,8 @@ static int decode_frame(AVCodecContext *avctx,
                     av_log(avctx, AV_LOG_WARNING, "args overflow (%i)\n", s->nb_args);
                 if (s->nb_args < MAX_NB_ARGS && s->args[s->nb_args])
                     s->nb_args++;
-                if (execute_code(avctx, buf[0]) < 0)
-                    return -1;
+                if ((ret = execute_code(avctx, buf[0])) < 0)
+                    return ret;
                 s->state = STATE_NORMAL;
             }
             break;