[FFmpeg-cvslog] liavfi/avcodec: allow channel layouts with fewer channels than actually available.

Michael Niedermayer git at videolan.org
Mon Nov 19 00:39:56 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 18 19:26:46 2012 +0100| [27d39c225bb35e25431f562160cf28f3aacdb3c7] | committer: Michael Niedermayer

liavfi/avcodec: allow channel layouts with fewer channels than actually available.

This fixes the regression with Ticket1726, where some audio was lost.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27d39c225bb35e25431f562160cf28f3aacdb3c7
---

 libavfilter/avcodec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index 5ace9d9..30b8258 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -61,7 +61,7 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
         dst->audio->sample_rate         = src->sample_rate;
         dst->audio->channel_layout      = src->channel_layout;
         dst->audio->channels            = src->channels;
-        if(src->channels != av_get_channel_layout_nb_channels(src->channel_layout)) {
+        if(src->channels < av_get_channel_layout_nb_channels(src->channel_layout)) {
             av_log(0, AV_LOG_ERROR, "libavfilter does not support this channel layout\n");
             return AVERROR(EINVAL);
         }



More information about the ffmpeg-cvslog mailing list