diff --git a/libavcodec/dca.c b/libavcodec/dca.c index ddd2be9fb8..5cf5b2629a 100644 --- a/libavcodec/dca.c +++ b/libavcodec/dca.c @@ -1815,8 +1815,9 @@ static int dca_decode_frame(AVCodecContext * avctx, return -1; } - if (avctx->channels && avctx->channels != channels) { - av_log(avctx, AV_LOG_INFO, "Number of channels changed in DCA decoder (%d -> %d)\n", avctx->channels, channels); + if (avctx->channels != channels) { + if (avctx->channels) + av_log(avctx, AV_LOG_INFO, "Number of channels changed in DCA decoder (%d -> %d)\n", avctx->channels, channels); avctx->channels = channels; }