use the ost->enc_ctx->channel_layout for f->channel_layout not f->channel_layout = av_get_default_channel_layout(ost->enc_ctx->channels); ffmpeg_opt.c static int open_output_file(OptionsContext *o, const char *filename) Old: if (ost->enc_ctx->channels) { f->channel_layout = av_get_default_channel_layout(ost->enc_ctx->channels); } else if (ost->enc->channel_layouts) { count = 0; while (ost->enc->channel_layouts[count]) count++; f->channel_layouts = av_mallocz_array(count + 1, sizeof(*f->channel_layouts)); if (!f->channel_layouts) exit_program(1); memcpy(f->channel_layouts, ost->enc->channel_layouts, (count + 1) * sizeof(*f->channel_layouts)); } new: if (ost->enc_ctx->channel_layout) { f->channel_layout = ost->enc_ctx->channel_layout; } else if (ost->enc_ctx->channels) { f->channel_layout = av_get_default_channel_layout(ost->enc_ctx->channels); } else if (ost->enc->channel_layouts) { count = 0; while (ost->enc->channel_layouts[count]) count++; f->channel_layouts = av_mallocz_array(count + 1, sizeof(*f->channel_layouts)); if (!f->channel_layouts) exit_program(1); memcpy(f->channel_layouts, ost->enc->channel_layouts, (count + 1) * sizeof(*f->channel_layouts)); } _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] ffmpeg_opt.c wrong parameter for Filter
sebastian-doerf...@t-online.de Thu, 29 Mar 2018 17:18:07 -0700
- [FFmpeg-devel] ffmpeg_opt.c wrong parameter... sebastian-doerf...@t-online.de
- Re: [FFmpeg-devel] ffmpeg_opt.c wrong ... pkv.stream