[FFmpeg-devel] [PATCH 059/281] flic: convert to new channel layout API

Anton Khirnov anton at khirnov.net
Thu Jan 27 09:46:45 EET 2022


Quoting James Almer (2022-01-13 02:50:21)
> From: Vittorio Giovara <vittorio.giovara at gmail.com>
> 
> Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
>  libavformat/flic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/flic.c b/libavformat/flic.c
> index 44ed696421..496402aa94 100644
> --- a/libavformat/flic.c
> +++ b/libavformat/flic.c
> @@ -157,10 +157,10 @@ static int flic_read_header(AVFormatContext *s)
>          ast->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
>          ast->codecpar->codec_tag = 0;
>          ast->codecpar->sample_rate = FLIC_TFTD_SAMPLE_RATE;
> -        ast->codecpar->channels = 1;
> +        ast->codecpar->format   = AV_SAMPLE_FMT_U8;

This is unrelated.

Setting the format was removed in ffmpeg (but not in libav) in
7b007a7c1fad57e9ed4b685c1d3b4222f02d9720, with the comment
"It is supposed to be set from lavc only."
At the time it was still done on the AVStream-embedded codec context, so
it might have been true, but today there is no issue with setting the
AVCodecParameters format from the demuxer, several other demuxers do so.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list