Skip to content
Snippets Groups Projects
Commit 27d39c22 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 0df7d95a
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src) ...@@ -61,7 +61,7 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
dst->audio->sample_rate = src->sample_rate; dst->audio->sample_rate = src->sample_rate;
dst->audio->channel_layout = src->channel_layout; dst->audio->channel_layout = src->channel_layout;
dst->audio->channels = src->channels; 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"); av_log(0, AV_LOG_ERROR, "libavfilter does not support this channel layout\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment