2019-02-07 16:34 GMT+01:00, Moritz Barsnick <barsn...@gmx.net>: > On Thu, Feb 07, 2019 at 14:40:40 +0100, Carl Eugen Hoyos wrote: >> + if (p[0] < 0x20) { >> + p++; >> + if (--len < 0) >> + return NULL; >> + } > > If I understand section "A.2 Selection of character table" of ETSI EN > 300 468 correctly, you need to drop an additional byte if the first > byte (p[0]) is 0x1F, or an additional two bytes if the first one is > 0x10.
New patch attached. Thank you, Carl Eugen
From a63c53bc224b6a1d53197e3dafd2ec9c6097d3c0 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos <ceffm...@gmail.com> Date: Thu, 7 Feb 2019 16:45:19 +0100 Subject: [PATCH] lavf/mpegts: Do not print the character coding as part of service name. Fixes ticket #6320. --- libavformat/mpegts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index b04fd7b..f161c0f 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -674,6 +674,18 @@ static char *getstr8(const uint8_t **pp, const uint8_t *p_end) return NULL; if (len > p_end - p) return NULL; + if (*p < 0x20) { + if (*p == 0x10) { + p += 2; + len -= 2; + } else if (*p == 0x1f) { + p++; + len--; + } + p++; + if (--len < 0) + return NULL; + } str = av_malloc(len + 1); if (!str) return NULL; -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel