Re: [FFmpeg-devel] [PATCH] avformat/assenc: fix incorrect copy of null terminator

2023-01-31 Thread Tim Angus
On 31/01/2023 12:37, "zhilizhao(赵志立)" wrote: +/* extradata may or may not be null terminated; in the case where + * it is, avoid copying a null into the middle of the buffer */ +while (header_size > 0 && par->extradata[header_size - 1] == '\0') +header_size--;

Re: [FFmpeg-devel] [PATCH] avformat/assenc: fix incorrect copy of null terminator

2023-01-31 Thread zhilizhao(赵志立)
> On Jan 18, 2023, at 22:31, Tim Angus wrote: > > When writing a subtitle SSA/ASS subtitle file, the > AVCodecParameters::extradata buffer is written directly to the output, > potentially including a null terminating character, which is sometimes > present. The result is the output having a

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

2023-01-18 Thread Tim Angus
When writing a subtitle SSA/ASS subtitle file, the AVCodecParameters::extradata buffer is written directly to the output, potentially including a null terminating character, which is sometimes present. The result is the output having a null character in the middle; this is addressed here by