summaryrefslogtreecommitdiff
path: root/fftools
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-23 18:33:08 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-07-23 19:01:44 +0200
commitb0ae5d02f3664545e54c8ce0101037619c4fa7e6 (patch)
tree74480c346e24ac9e9fe04ff3224550d5872fb61b /fftools
parent8136ab8e768b3341929f98412071d492fa729a06 (diff)
fftools/ffmpeg: Zero subtitle packet padding
Fixes uninitialized reads in the sub-lrc-remux test. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools')
-rw-r--r--fftools/ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index 632ac25cb2..1089cc48c4 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1118,7 +1118,7 @@ static void do_subtitle_out(OutputFile *of,
exit_program(1);
}
- pkt->size = subtitle_out_size;
+ av_shrink_packet(pkt, subtitle_out_size);
pkt->pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->mux_timebase);
pkt->duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->mux_timebase);
if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) {