1
0
Fork 0

HACK: avcodec/utils: don't error out on missing channel info, the decoders are not fixed for this yet

This commit is contained in:
Hendrik Leppkes 2021-06-16 08:24:35 +02:00
parent 6a25843329
commit 993fd0a918
Signed by: hendrik
GPG Key ID: 846079A4B0A7C1B5
1 changed files with 4 additions and 2 deletions

View File

@ -247,8 +247,10 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
&& !(codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF)) {
av_log(avctx, AV_LOG_ERROR, "%s requires channel layout to be set\n",
av_codec_is_decoder(codec) ? "Decoder" : "Encoder");
ret = AVERROR(EINVAL);
goto free_and_end;
if (!av_codec_is_decoder(codec)) {
ret = AVERROR(EINVAL);
goto free_and_end;
}
}
if (avctx->ch_layout.nb_channels && !av_channel_layout_check(&avctx->ch_layout)) {
av_log(avctx, AV_LOG_ERROR, "Invalid channel layout\n");