Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-01 16:47:51 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-02 18:16:21 +0300
commit2004d8d36dd5f85ae806ea00f7cd78a2c65d3815 (patch)
treeed86251e0ed1c70dcb53126e3f04e7bb1ee290b8 /libavformat/sccdec.c
parentac42b604415af9e72b61ae58976e6b5c4c7499c7 (diff)
avformat/sccdec: Avoid zero-terminating unnecessarily
ff_subtitles_queue_insert() does not require its events to be zero-terminated as it has a parameter for the length. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/sccdec.c')
-rw-r--r--libavformat/sccdec.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/libavformat/sccdec.c b/libavformat/sccdec.c
index 286b1b3b0e..5f90edbef6 100644
--- a/libavformat/sccdec.c
+++ b/libavformat/sccdec.c
@@ -117,8 +117,6 @@ static int scc_read_header(AVFormatContext *s)
if (i > 12 && o1 == 0x94 && o2 == 0x20 && saveptr &&
(av_strncasecmp(saveptr, "942f", 4) && !av_strncasecmp(saveptr, "942c", 4))) {
- out[i] = 0;
-
sub = ff_subtitles_queue_insert(&scc->q, out, i, 0);
if (!sub)
return AVERROR(ENOMEM);
@@ -136,8 +134,6 @@ static int scc_read_header(AVFormatContext *s)
out[i+2] = o2;
}
- out[i] = 0;
-
sub = ff_subtitles_queue_insert(&scc->q, out, i, 0);
if (!sub)
return AVERROR(ENOMEM);