[FFmpeg-devel] [DEVEL][PATCH] ffmpeg: fix channel_layout bug on non-default layout

Kv Pham pkv.stream at gmail.com
Thu Oct 5 00:26:21 EEST 2017


Le 4 oct. 2017 11:24 PM, "Moritz Barsnick" <barsnick at gmx.net> a écrit :

On Mon, Oct 02, 2017 at 21:50:50 +0200, pkv.stream wrote:
>      if (!ost->stream_copy) {
> -        char *sample_fmt = NULL;
> +
> +             char *sample_fmt = NULL;
>

This is very obviously a patch which will not be accepted.


> -        MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st);
> +             AVDictionaryEntry *output_layout =
av_dict_get(o->g->codec_opts, "channel_layout",NULL, AV_DICT_MATCH_CASE);
> +        if (output_layout)
> +            ost->enc_ctx->channel_layout =
strtoull(output_layout->value, NULL, 10);
> +
> +             MATCH_PER_STREAM_OPT(sample_fmts, str, sample_fmt, oc, st);

Your indentation is totally wrong, and makes use of tabs. Please follow
the ffmpeg style.


Ah sorry for being careless.
Thanks for pointing out. Will correct.


Moritz
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list