Commit 168f9e8c authored by Justin Ruggles's avatar Justin Ruggles

If AVCodecContext.channel_layout and AVCodecContext.channels are both

non-zero, check to make sure they do not contradict eachother.
parent 3dfc3e70
......@@ -578,6 +578,13 @@ int attribute_align_arg avcodec_open(AVCodecContext *avctx, AVCodec *codec)
if (avctx->channel_layout && avctx->channels) {
if (av_get_channel_layout_nb_channels(avctx->channel_layout) != avctx->channels) {
av_log(avctx, AV_LOG_ERROR, "channel layout does not match number of channels\n");
goto free_and_end;
if(avctx->codec->init && !(avctx->active_thread_type&FF_THREAD_FRAME)){
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment