[FFmpeg-devel] [PATCH 2/8] fftools/ffmpeg: stop using AVCodecContext.sample_rate in decode_audio()

Anton Khirnov anton at khirnov.net
Thu Jan 5 13:09:54 EET 2023


Quoting Michael Niedermayer (2023-01-05 01:46:45)
> On Wed, Jan 04, 2023 at 05:42:40PM +0100, Anton Khirnov wrote:
> > Use the decoded frame's sample_rate instead, which is the authoritative
> > value.
> > 
> > Drop a now-obsolete check validating AVCodecContext.sample_rate.
> > ---
> >  fftools/ffmpeg.c | 15 ++++++---------
> >  1 file changed, 6 insertions(+), 9 deletions(-)
> 
> Causes division by 0 
> will send you the sample privately

Should be fixed in the patchset I just sent.

IMO lavc returning invalid frames is a bug that should be fixed in lavc,
so this patch should still go in.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list