Commit 2004d8d3 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt

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: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
parent ac42b604
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment