diff --git a/recording-daemon/resample.c b/recording-daemon/resample.c index 317d09ade..87f7200ef 100644 --- a/recording-daemon/resample.c +++ b/recording-daemon/resample.c @@ -37,6 +37,10 @@ resample: if (!resample->avresample) goto err; + if (!frame->channel_layout) + frame->channel_layout = av_get_default_channel_layout( + av_frame_get_channels(frame)); + err = "failed to set resample option"; if ((errcode = av_opt_set_int(resample->avresample, "in_channel_layout", frame->channel_layout, 0)))