mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 22:16:22 +00:00
mpegtsdescriptor: Fix handling of unknown stream encodings
If we cannot identify the encoding used for a string, return a NULL string instead of garbage and add a FIXME so we can detect and later fix it.
This commit is contained in:
parent
4fe26740c7
commit
34164610b0
1 changed files with 3 additions and 5 deletions
|
@ -376,11 +376,9 @@ get_encoding_and_convert (const gchar * text, guint length)
|
|||
if (__iconvs[encoding] == ((GIConv) - 1))
|
||||
__iconvs[encoding] = g_iconv_open ("utf-8", iconvtablename[encoding]);
|
||||
giconv = __iconvs[encoding];
|
||||
}
|
||||
|
||||
if (giconv == ((GIConv) - 1)) {
|
||||
GST_WARNING ("Could not detect encoding");
|
||||
converted_str = g_strndup (text, length);
|
||||
} else {
|
||||
GST_FIXME ("Could not detect encoding. Returning NULL string");
|
||||
converted_str = NULL;
|
||||
goto beach;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue