1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00
FFmpeg/libavcodec
Andreas Rheinhardt 0bc3c070fb avcodec/movtextenc: Fix encoding of subtitles with multiple rects
The format of a mov_text (3GPP Timed Text) sample is:

uint16_t text_length;
uint8_t  text[text_length];
TextSampleModifierBox text_modifier;

Yet in case our encoder receives an AVSubtitle with multiple
ASS AVSubtitleRects, it creates something like this:
uint16_t text_length;
uint8_t  text[text_length_1];
TextSampleModifierBox text_modifier_1;
uint8_t  text[text_length_2];
TextSampleModifierBox text_modifier_2;
...

where text_length is the sum of all the text_length_*.
This commit fixes this by writing the TextSampleModifierBoxes only
after all the rects have been written.

Reviewed-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-12-02 07:29:02 +01:00
..
2021-07-22 14:47:57 +02:00
2021-10-03 11:42:15 +02:00
2021-07-22 14:47:57 +02:00
2021-09-05 22:22:05 +02:00
2021-07-22 15:02:30 +02:00
2021-10-08 20:37:36 +11:00
2021-10-08 20:37:36 +11:00
2021-07-22 14:47:57 +02:00
2021-07-22 14:47:57 +02:00
2021-08-05 19:46:33 +02:00
2021-09-29 18:00:13 +08:00
2021-10-09 11:42:16 +02:00
2021-07-22 14:47:57 +02:00
2021-08-02 14:30:52 +02:00
2021-10-02 18:49:40 +02:00
2021-07-22 14:47:57 +02:00
2021-07-22 15:02:30 +02:00
2021-07-22 14:47:57 +02:00
2021-09-19 22:36:23 +02:00
2021-10-10 17:44:41 +02:00
2021-07-22 14:47:57 +02:00
2021-07-22 14:47:57 +02:00
2021-08-26 09:20:56 +02:00
2021-09-12 22:23:35 +02:00