mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
gst/mpegtsparse/mpegtspacketizer.c: Fix problem when empty string is provided.
Original commit message from CVS: Patch by: Sebastian Pölsterl * gst/mpegtsparse/mpegtspacketizer.c: Fix problem when empty string is provided.
This commit is contained in:
parent
25442736e5
commit
15f2d610f0
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-06-20 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||||
|
|
||||||
|
Patch by: Sebastian Pölsterl
|
||||||
|
|
||||||
|
* gst/mpegtsparse/mpegtspacketizer.c:
|
||||||
|
Fix problem when empty string is provided.
|
||||||
|
|
||||||
2008-06-20 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
2008-06-20 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||||
|
|
||||||
* gst/deinterlace2/tvtime/vfir.c: (deinterlace_line_mmxext),
|
* gst/deinterlace2/tvtime/vfir.c: (deinterlace_line_mmxext),
|
||||||
|
|
|
@ -2183,9 +2183,13 @@ convert_to_utf8 (const gchar * text, gint length, guint start,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sb->len > 0) {
|
||||||
new_text =
|
new_text =
|
||||||
g_convert ((gchar *) sb->data, sb->len, "utf-8", encoding, NULL, NULL,
|
g_convert ((gchar *) sb->data, sb->len, "utf-8", encoding, NULL, NULL,
|
||||||
error);
|
error);
|
||||||
|
} else {
|
||||||
|
new_text = g_strdup ("");
|
||||||
|
}
|
||||||
|
|
||||||
g_byte_array_free (sb, TRUE);
|
g_byte_array_free (sb, TRUE);
|
||||||
|
|
||||||
|
@ -2201,6 +2205,8 @@ get_encoding_and_convert (const gchar * text, guint length)
|
||||||
guint start_text = 0;
|
guint start_text = 0;
|
||||||
gboolean is_multibyte;
|
gboolean is_multibyte;
|
||||||
|
|
||||||
|
g_return_val_if_fail (text != NULL, NULL);
|
||||||
|
|
||||||
encoding = get_encoding (text, &start_text, &is_multibyte);
|
encoding = get_encoding (text, &start_text, &is_multibyte);
|
||||||
|
|
||||||
if (encoding == NULL) {
|
if (encoding == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue