[FFmpeg-cvslog] avformat/jacosubenc: Fix writing extradata

Andreas Rheinhardt git at videolan.org
Wed Jan 12 02:51:04 EET 2022


ffmpeg | branch: release/4.4 | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri Sep 24 00:31:52 2021 +0200| [9abd7d144d6a3ca9c4c1bd363b1e0f279c38697c] | committer: Andreas Rheinhardt

avformat/jacosubenc: Fix writing extradata

The terminating '\0' is no longer included in the size of
the extradata output by the demuxer since commit
36e61e24e7ac737b38c4382d439329352d9e0c29.
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 at outlook.com>
(cherry picked from commit 54e8dcce8e5fce245715aafe1768beb0b6aa49f5)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9abd7d144d6a3ca9c4c1bd363b1e0f279c38697c
---

 libavformat/jacosubenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c
index 77575c6b3c..1213a58d52 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;
 }



More information about the ffmpeg-cvslog mailing list