summaryrefslogtreecommitdiff
path: root/libavfilter/avcodec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/avcodec.c')
-rw-r--r--libavfilter/avcodec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/avcodec.c b/libavfilter/avcodec.c
index feaf641ccb..c9c8f3c1c1 100644
--- a/libavfilter/avcodec.c
+++ b/libavfilter/avcodec.c
@@ -60,6 +60,10 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
case AVMEDIA_TYPE_AUDIO:
dst->audio->sample_rate = src->sample_rate;
dst->audio->channel_layout = 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);
+ }
break;
default:
return AVERROR(EINVAL);