[FFmpeg-devel] [PATCH]Plausibility check for TrueHD channel_layout

compn tempn at twmi.rr.com
Thu Mar 31 20:11:20 CEST 2011


On Thu, 31 Mar 2011 18:41:07 +0200, Carl Eugen Hoyos wrote:
>
>Hi!
>
>I believe libavcodec should not set channel_layout to values that must be 
>wrong.

>+            if (av_popcount(avctx->channel_layout) != avctx->channels) {
>+                avctx->channel_layout = 0;
>+                av_log_ask_for_sample(avctx, "Unknown channel layout.");
>+            }

this might be a dumb question... but it looks so generic, why not put
this higher up the audio chain so it can be reused in multiple codecs?

-compn


More information about the ffmpeg-devel mailing list