[FFmpeg-devel] [PATCH 1/1] avformat/assenc: avoid incorrect copy of null terminator

Tim Angus tim at ngus.net
Wed Feb 8 17:00:46 EET 2023

On 27/01/2023 17:20, Tim Angus wrote:
> When writing a subtitle SSA/ASS subtitle file, the
> AVCodecParameters::extradata buffer is written directly to the output.
> In the case where the buffer is filled from a matroska source file
> produced by some older versions of Handbrake, this buffer ends with a
> null terminating character, which is then erroneously copied into the
> middle of the output file. The refactoring here avoids this problem by
> copying the source buffer, manually null terminating it, then treating
> it as a string rather than a raw buffer. This way it is agnostic as to
> whether the source buffer was null terminated or not.
Could somebody give this a look please? Thanks.

More information about the ffmpeg-devel mailing list