[FFmpeg-devel] [PATCH 5/6] lavc: do not pass unknown layouts to encoders.

Nicolas George nicolas.george at normalesup.org
Wed Nov 28 16:14:20 CET 2012


Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
 libavcodec/utils.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 32bda51..2567c03 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1031,6 +1031,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
                 goto free_and_end;
             }
         }
+        if (avctx->channel_layout & AV_CH_LAYOUT_UNKNOWN)
+            avctx->channel_layout = 0;
         if (avctx->codec->channel_layouts) {
             if (!avctx->channel_layout) {
                 av_log(avctx, AV_LOG_WARNING, "Channel layout not specified\n");
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list