Browse Source

obs-ffmpeg: Set channel layout to avoid warning

kc5nra 10 years ago
parent
commit
f04be51947
1 changed files with 2 additions and 0 deletions
  1. 2 0
      plugins/obs-ffmpeg/obs-ffmpeg-output.c

+ 2 - 0
plugins/obs-ffmpeg/obs-ffmpeg-output.c

@@ -309,6 +309,8 @@ static bool create_audio_stream(struct ffmpeg_data *data)
 	context->time_base   = (AVRational){ 1, aoi.samples_per_sec };
 	context->channels    = get_audio_channels(aoi.speakers);
 	context->sample_rate = aoi.samples_per_sec;
+	context->channel_layout =
+			av_get_default_channel_layout(context->channels);
 	context->sample_fmt  = data->acodec->sample_fmts ?
 		data->acodec->sample_fmts[0] : AV_SAMPLE_FMT_FLTP;