Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_aarch64_jetson | success | Make finished |
andriy/make_fate_aarch64_jetson | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
Quoting James Almer (2022-01-13 02:50:21) > From: Vittorio Giovara <vittorio.giovara@gmail.com> > > Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> > Signed-off-by: James Almer <jamrial@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.
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; ast->codecpar->bit_rate = st->codecpar->sample_rate * 8; ast->codecpar->bits_per_coded_sample = 8; - ast->codecpar->channel_layout = AV_CH_LAYOUT_MONO; + ast->codecpar->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO; ast->codecpar->extradata_size = 0; /* Since the header information is incorrect we have to figure out the