From 9bde6c6be0ea568f6ce646690616a0d4274095d4 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Thu, 12 Dec 2019 16:53:17 +0100 Subject: avformat/microdvd: Use \n instead of \0 to end file header Up until now, the microdvd demuxer uses av_strdup() to allocate the extradata from a string; its length is set to strlen() + 1, i.e. including the \0 at the end. Upon remuxing, the muxer would simply copy the extradata at the beginning, including the \0. This commit changes this by not adding the \0 to the size of the extradata; the muxer now delimits extradata by inserting a \n. This required to change the subtitles-microdvd-remux FATE-test. Furthermore, the extradata is now allocated with zeroed padding. The microdvd decoder is not affected by this, as it didn't use the size of the extradata at all, but treated it as a C-string. Signed-off-by: Andreas Rheinhardt Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer --- tests/ref/fate/sub-microdvd-remux | Bin 416 -> 416 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'tests') diff --git a/tests/ref/fate/sub-microdvd-remux b/tests/ref/fate/sub-microdvd-remux index a71da99031..92ff233f56 100644 Binary files a/tests/ref/fate/sub-microdvd-remux and b/tests/ref/fate/sub-microdvd-remux differ -- cgit v1.2.3