diff options
author | Edward Hervey <edward@collabora.com> | 2013-07-04 07:48:10 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2013-07-04 08:45:32 +0200 |
commit | 34164610b09a61e549c76b69cea8d8efcfd494f5 (patch) | |
tree | dc796310a8a78e9115d71002caccd24192587a21 /gst-libs | |
parent | 4fe26740c77ad874b387e506fd4497225a6bf1d8 (diff) | |
download | gstreamer-plugins-bad-34164610b09a61e549c76b69cea8d8efcfd494f5.tar.gz |
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.
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/mpegts/gstmpegtsdescriptor.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c index 56e74366a..9850b307b 100644 --- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c +++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c @@ -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; } |