[FFmpeg-cvslog] Fix dca decoding for many samples after last commit.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Oct 28 19:21:27 CEST 2011
On Fri, Oct 28, 2011 at 07:15:45PM +0200, Carl Eugen Hoyos wrote:
> diff --git a/libavcodec/dca.c b/libavcodec/dca.c
> index ddd2be9..5cf5b26 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;
Stupid question, but what's the point of having the assignment in the
if anyway?
> 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);
> avctx->channels = channels;
Seems slightly simpler...
More information about the ffmpeg-cvslog
mailing list