X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=nageru%2Fmjpeg_encoder.cpp;h=a526c1e1e875c2e53cedece541a9020cd473625d;hb=68271fb0bddd8a48aa036428f2928a69a5e4e660;hp=a60f729158925381435b1a4a495a201cd459bac6;hpb=2dc38f684491f30639665a02e538f9a1e32d77ee;p=nageru diff --git a/nageru/mjpeg_encoder.cpp b/nageru/mjpeg_encoder.cpp index a60f729..a526c1e 100644 --- a/nageru/mjpeg_encoder.cpp +++ b/nageru/mjpeg_encoder.cpp @@ -10,6 +10,7 @@ extern "C" { #include +#include } #include "defs.h" @@ -190,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; }