]> git.sesse.net Git - ffmpeg/commitdiff
hqx: Merge invalid format check within switch block
authorVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 9 Apr 2015 16:09:31 +0000 (18:09 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Sun, 19 Apr 2015 11:41:59 +0000 (12:41 +0100)
libavcodec/hqx.c

index 3de3dc2e6230346940078625b6d4560f4a6dbec5..a231afcda7ef1d8fa0a733b17773980120d00fb2 100644 (file)
@@ -573,8 +573,7 @@ static int hqx_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt = AV_PIX_FMT_YUVA444P16;
         decode_func = hqx_decode_444a;
         break;
-    }
-    if (!decode_func) {
+    default:
         av_log(avctx, AV_LOG_ERROR, "Invalid format: %d.\n", ctx->format);
         return AVERROR_INVALIDDATA;
     }