diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 717e9ea033..cd342b9d88 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -662,7 +662,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "channels mismatch\n"); return AVERROR(EINVAL); } - if (bits && avctx->sample_fmt == AV_SAMPLE_FMT_U8) { + if (bits == (avctx->sample_fmt == AV_SAMPLE_FMT_U8)) { av_log(avctx, AV_LOG_ERROR, "sample format mismatch\n"); return AVERROR(EINVAL); }