Merge pull request #509 from jellyfin/fix-ass-null

avformat/assenc: do not copy null terminator
This commit is contained in:
gnattu
2024-12-14 15:55:52 +08:00
committed by GitHub
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
Index: FFmpeg/libavformat/assenc.c
===================================================================
--- FFmpeg.orig/libavformat/assenc.c
+++ FFmpeg/libavformat/assenc.c
@@ -67,7 +67,8 @@ static int write_header(AVFormatContext
ass->trailer = trailer;
}
- ffio_write_lines(s->pb, par->extradata, header_size, NULL);
+ header_size = av_strnlen(par->extradata, header_size);
+ ffio_write_lines(s->pb, par->extradata, (int)header_size, NULL);
ass->ssa_mode = !strstr(par->extradata, "\n[V4+ Styles]");
if (!strstr(par->extradata, "\n[Events]"))
+1
View File
@@ -79,4 +79,5 @@
0079-videotoolbox-remove-opengl-compatability.patch
0080-use-dynamic-pool-for-vpl-qsv-hwupload.patch
0081-backport-av1-videotoolbox.patch
0082-fix-ass-incorrect-null-copy.patch
0083-default-to-input-timebase-for-streamcopy.patch