[FFmpeg-devel] ffmpeg_opt.c wrong parameter for Filter

pkv.stream pkv.stream at gmail.com
Fri Mar 30 04:03:40 EEST 2018


Le 29/03/2018 à 2:53 PM, sebastian-doerfler at t-online.de a écrit :
>   
>   
> 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 at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Hi

the fix required is more involved than that.

Check the two solutions I ended up with:

http://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225769.html

and the original ticket :

https://trac.ffmpeg.org/ticket/6706

The patch reviewing seems in limbo though and has been for several months.

best

pkv



More information about the ffmpeg-devel mailing list