]> git.sesse.net Git - nageru/blobdiff - nageru/mjpeg_encoder.cpp
Update most code to the new FFmpeg channel layout API.
[nageru] / nageru / mjpeg_encoder.cpp
index 193027b38483e42359f9733a3d899dcad0b4f8db..a526c1e1e875c2e53cedece541a9020cd473625d 100644 (file)
@@ -191,8 +191,9 @@ void add_audio_stream(AVFormatContext *avctx)
        stream->time_base = AVRational{ 1, OUTPUT_FREQUENCY };
        stream->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
        stream->codecpar->codec_id = AV_CODEC_ID_PCM_S32LE;
-       stream->codecpar->channel_layout = AV_CH_LAYOUT_STEREO;
-       stream->codecpar->channels = 2;
+       stream->codecpar->ch_layout.order = AV_CHANNEL_ORDER_NATIVE;
+       stream->codecpar->ch_layout.nb_channels = 2;
+       stream->codecpar->ch_layout.u.mask = AV_CH_LAYOUT_STEREO;
        stream->codecpar->sample_rate = OUTPUT_FREQUENCY;
 }