diff mbox series

[FFmpeg-devel,1/2] avformat/jacosubenc: Fix writing extradata

Message ID PR3PR03MB66658AA69986A10550C7F1578FA39@PR3PR03MB6665.eurprd03.prod.outlook.com
State Accepted
Commit 54e8dcce8e5fce245715aafe1768beb0b6aa49f5
Headers show
Series [FFmpeg-devel,1/2] avformat/jacosubenc: Fix writing extradata
Related show


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 23, 2021, 11:09 p.m. UTC
The terminating '\0' is no longer included in the size of
the extradata output by the demuxer since commit
E.g. if one remuxes the JACOsub sample JACOsub_capability_tester.jss
from the FATE suite, one receives a file not recognized as JACOsub
before this patch.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
 libavformat/jacosubenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c
index 324f2957fb..f0548bb282 100644
--- a/libavformat/jacosubenc.c
+++ b/libavformat/jacosubenc.c
@@ -24,7 +24,7 @@  static int jacosub_write_header(AVFormatContext *s)
     const AVCodecParameters *par = s->streams[0]->codecpar;
     if (par->extradata_size) {
-        avio_write(s->pb, par->extradata, par->extradata_size - 1);
+        avio_write(s->pb, par->extradata, par->extradata_size);
     return 0;