[FFmpeg-devel] [FFmpeg-cvslog] fftools/sync_queue: use timebase from input frames/packets

Anton Khirnov anton at khirnov.net
Wed Apr 12 13:26:20 EEST 2023


After some investigation, it seems that before this patch there was a
bug in the sync queue setup code that caused a wrong timebase to be used
for the audio stream. Because of that, many more audio frames were
output than should have been (116 frames/133632 samples/2.8 seconds).

After the patch, the correct timebase is used and only 9 audio frames
(10368 samples, 0.216 seconds) are encoded. This is much closer to the
3 video frames requested in your commandline and thus more correct.
As a result, the file is now much smaller and the
 if (lensum*9/10 > maxpos || lensum < maxpos*9/10)
check currently on line 476 of avidec.c triggers and stops bitrate
calculation. I cannot say whether that check is faulty, but this patch
seems like it's doing what it should.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list