> On Dec 29, 2017, at 4:17 PM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > > 2017-12-29 22:14 GMT+01:00 Devin Heitmueller <dheitmuel...@ltnglobal.com>: >> Hi Carl, >> >>> On Dec 29, 2017, at 3:55 PM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: >>> >>> 2017-12-29 19:12 GMT+01:00 Devin Heitmueller <dheitmuel...@ltnglobal.com>: >>> >>>> + for (int i = 0; i < ctx->max_audio_channels / 2; i++) { >>>> + st = avformat_new_stream(avctx, NULL); >>>> + if (!st) { >>>> + av_log(avctx, AV_LOG_ERROR, "Cannot add stream %d\n", i); >>>> + ret = AVERROR(ENOMEM); >>>> + goto error; >>>> + } >>>> + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; >>>> + st->codecpar->codec_id = ctx->audio_depth == 32 ? >>>> AV_CODEC_ID_PCM_S32LE : AV_CODEC_ID_PCM_S16LE; >>>> + st->codecpar->sample_rate = bmdAudioSampleRate48kHz; >>>> + st->codecpar->channels = 2; >>>> + avpriv_set_pts_info(st, 64, 1, 1000000); /* 64 bits pts in >>>> us */ >>>> + ctx->audio_st[i] = st; >>>> + ctx->num_audio_streams++; >>>> + } >>> >>> I would have expected that the channel_layout is set to STEREO in >>> this case, is that not always true? >> >> I’m not sure I understand your comment. Is there some channel layout >> property of the codec parameters I should be setting? > > Yes, AVCodecParameters->channel_layout.
Ah, ok. I will fix that and resubmit in the next series. Thanks, Devin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel