a327bc056124c595cba58885501c47bbf50830d0
When audio and video streams have different time bases (e.g. video at 1/90000 and audio at 1/48000), vs->start_pts was stored as a raw PTS from whichever stream's packet arrived first. The segment split comparison then subtracted this value from the current packet's PTS without accounting for the time base difference, producing incorrect elapsed time calculations. This caused segments to be split at wrong points — either too frequently (on every keyframe) or not at all, depending on the relative magnitudes of the time bases. Fix by normalizing vs->start_pts to AV_TIME_BASE_Q at the point of assignment and converting pkt->pts to the same base before comparison. This ensures the segment split decision is always unit-consistent regardless of which stream's packet is being evaluated. The bug is most easily triggered by HLS muxing with video passthrough and audio transcode, where the video retains its container time base while the audio encoder outputs in its native time base. Signed-off-by: Ben Kepner <u6bkep@gmail.com>
…
FFmpeg README
FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
Libraries
libavcodecprovides implementation of a wider range of codecs.libavformatimplements streaming protocols, container formats and basic I/O access.libavutilincludes hashers, decompressors and miscellaneous utility functions.libavfilterprovides means to alter decoded audio and video through a directed graph of connected filters.libavdeviceprovides an abstraction to access capture and playback devices.libswresampleimplements audio mixing and resampling routines.libswscaleimplements color conversion and scaling routines.
Tools
- ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
- ffplay is a minimalistic multimedia player.
- ffprobe is a simple analysis tool to inspect multimedia content.
- Additional small tools such as
aviocat,ismindexandqt-faststart.
Documentation
The offline documentation is available in the doc/ directory.
The online documentation is available in the main website and in the wiki.
Examples
Coding examples are available in the doc/examples directory.
License
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.
Contributing
Patches should be submitted to the ffmpeg-devel mailing list using
git format-patch or git send-email. Github pull requests should be
avoided because they are not part of our review process and will be ignored.
Languages
Diff
100%