Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 7/7] ffmpeg: make the ac option set the demuxer's ch_layout AVOption
Date: Mon, 21 Mar 2022 22:12:10 +0100
Message-ID: <AS1PR01MB95646BCE17FD5157560FD7FD8F169@AS1PR01MB9564.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <20220320201523.51516-1-jamrial@gmail.com>

James Almer:
> channels is deprecated on all supported raw demuxers.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  fftools/ffmpeg_opt.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> index 720a3cc46a..213a34eadc 100644
> --- a/fftools/ffmpeg_opt.c
> +++ b/fftools/ffmpeg_opt.c
> @@ -1122,7 +1122,9 @@ static int open_input_file(OptionsContext *o, const char *filename)
>          if (file_iformat && (priv_class = file_iformat->priv_class) &&
>              av_opt_find(&priv_class, "channels", NULL, 0,
>                          AV_OPT_SEARCH_FAKE_OBJ)) {
> -            av_dict_set_int(&o->g->format_opts, "channels", o->audio_channels[o->nb_audio_channels - 1].u.i, 0);
> +            char buf[32] = "";
> +            av_strlcatf(buf, sizeof(buf), "%dC", o->audio_channels[o->nb_audio_channels - 1].u.i);

snprintf; it also avoids the initialization.

> +            av_dict_set(&o->g->format_opts, "ch_layout", buf, 0);
>          }
>      }
>      if (o->nb_audio_ch_layouts) {

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  reply	other threads:[~2022-03-21 21:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 19:36 [FFmpeg-devel] [PATCH 1/7] avformat/pcmdec: deprecate channels option James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 2/7 v2] avformat/pcmdec: add support to set channel layout in sln demuxer James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 3/7 v2] avformat/dfpwmdec: add support to set channel layout James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 4/7 v2] avformat/test/seek: set ch_layout instead of channels James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 5/7 v2] ffmpeg: replace custom channel_layout code with an SpecifierOpt based one James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 6/7] ffmpeg: add a ch_layout option as an alias to channel_layout James Almer
2022-03-20 19:36 ` [FFmpeg-devel] [PATCH 7/7] ffmpeg: deprecate the ac option James Almer
2022-03-20 19:44   ` Nicolas George
2022-03-20 20:05     ` James Almer
2022-03-20 20:06     ` [FFmpeg-devel] [PATCH 7/7] ffmpeg: make the ac option set the demuxer's ch_layout AVOption James Almer
2022-03-20 20:09       ` Nicolas George
2022-03-20 20:15         ` James Almer
2022-03-21 21:12           ` Andreas Rheinhardt [this message]
2022-03-21 21:27             ` James Almer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AS1PR01MB95646BCE17FD5157560FD7FD8F169@AS1PR01MB9564.eurprd01.prod.exchangelabs.com \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git