When writing a subtitle SSA/ASS subtitle file, the
AVCodecParameters::extradata buffer is written directly to the output,
including the null terminating character of the buffer. This appears to
be a simple off by one bug, which is fixed by the subsequent patch.
Tim Angus (1):
avformat/assenc
Signed-off-by: Tim Angus
---
libavformat/assenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 1600f0a02b..07b6e3a171 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -69,7 +69,7 @@ static int write_header
On 05/01/2023 21:11, Andreas Rheinhardt wrote:
Tim Angus:
Signed-off-by: Tim Angus
---
libavformat/assenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 1600f0a02b..07b6e3a171 100644
--- a/libavformat/assenc.c
+++ b
On 05/01/2023 22:03, Andreas Rheinhardt wrote:
Yes I did; no failures locally, though I see there are failures in this
"patchwork" thingy, presumably that is running extra tests?
Did you run FATE with samples or without?
No idea, I just ran "make fate" as per the submission checklist.
__
e trailing null terminator(s) present.
FATE succeeds as there are no mkvs in the suite that have ASS subtitles
embedded.
Tim Angus (1):
avformat/assenc: fix incorrect copy of null terminator
libavformat/assenc.c | 6 ++
1 file changed, 6 insertions
avoiding copying it.
Signed-off-by: Tim Angus
---
libavformat/assenc.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 1600f0a02b..5e74b84575 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -69,6 +69,11 @@ static int
On 18/01/2023 14:31, Tim Angus wrote:
Some matroska files embed ASS format subtitles. The header for said subtitles
include the header for the subtitle stream in the "codec private data" section.
It appears to be optional whether or not the last byte of this data is 0, i.e.
a null term
.
Signed-off-by: Tim Angus
---
libavformat/assenc.c | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 1600f0a02b..4c9ea6f982 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -24,6 +24,7
(presumably) they encounter a 0 byte somewhere
downstream of extradata. I say notionally because often extradata will
in fact be null terminated (which causes other problems, see parent
commit).
Signed-off-by: Tim Angus
---
libavformat/assenc.c | 8
1 file changed, 4 insertions(+), 4 deletions
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--;
On 31/01/2023 11:13, Tim Angus wrote:
In the write_header function of the ASS encoder, extradata is
searched for a substring using the strstr function. strstr expects a
null terminated C string as its first parameter, but extradata is
(notionally) not one of these, meaning that the calls to
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
12 matches
Mail list logo