summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
diff options
context:
space:
mode:
authorCarlos Rafael Giani <dv@pseudoterminal.org>2015-11-05 09:32:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-16 11:39:35 +0000
commit4a55d12f640410fae25fec76ddf037c208abdaf9 (patch)
treef921431447ce14184357354f248832526c272e84 /meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
parent8360f23bca2c3e95493ac706ec343479dd3b08dc (diff)
downloadpoky-4a55d12f640410fae25fec76ddf037c208abdaf9.tar.gz
gstreamer1.0-plugins-base: upgrade to version 1.6.1
A number of patches had to be deleted in order for the recipe to work. Patches which cannot be applied cleanly to 1.6.1 and are nontrivial to fix: * 0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch * handle-audio-video-decoder-error.patch * taglist-not-send-to-down-stream-if-all-the-frame-cor.patch Patches which were rejected by upstream: * 0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch Patches which either were backports or accepted and integrated: * 0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch * 0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch * 0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch * do-not-change-eos-event-to-gap-event2.patch * do-not-change-eos-event-to-gap-event3.patch * do-not-change-eos-event-to-gap-event-if.patch * fix-id3demux-utf16-to-utf8-issue.patch * videobuffer_updata_alignment_update.patch * videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch (From OE-Core rev: f22fd450babf8c515f86334958f8ca2e0af6f19c) Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch')
-rwxr-xr-xmeta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch54
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
deleted file mode 100755
index ef3f75fba5..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1Author: Lyon Wang <b12696@freescale.com>
2Date: Thu Oct 9 17:37:43 2014 +0800
3
4[id3v2frames] Bug fix for id3demux issue
5
6Fix the issue that id3 tags utf16 charaters cannot be extreacted in id3demux
7when I tried to get the id3v2 tag such as TIT2, TALB etc. it will return extrac
8failed.
9
10Checked in id3v2frame.c, When parse the UTF-16 streams, it used g_convert() to
11convert the buffer from UTF-16 to UTF-8, however it will return err that this
12conversion is not supported which cause the extraction failed with these UTF-16
13characters.
14
15In the patch, use g_utf16_to_utf8() instead of g_convert, which can convert the
16character format successfully.
17
18https://bugzilla.gnome.org/show_bug.cgi?id=741144
19
20Upstream-Status: Backport [1.5.1]
21
22Signed-off-by: Lyon Wang <b12696@freescale.com>
23
24diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
25old mode 100644
26new mode 100755
27index 3785c2a..7b9d8ac
28--- a/gst-libs/gst/tag/id3v2frames.c
29+++ b/gst-libs/gst/tag/id3v2frames.c
30@@ -1057,14 +1057,17 @@ parse_insert_string_field (guint8 encoding, gchar * data, gint data_size,
31 data_size -= 2;
32 }
33
34- field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL);
35-
36- if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) {
37- /* As a fallback, try interpreting UTF-16 in the other endianness */
38- if (in_encode == utf16beenc)
39- field = g_convert (data, data_size, "UTF-8", utf16leenc,
40- NULL, NULL, NULL);
41+ if (in_encode == utf16beenc) {
42+ gunichar2 *data_utf16;
43+ guint i;
44+ data_utf16 = (gunichar2 *) data;
45+ for (i=0; i<(data_size>>1); i++) {
46+ data_utf16[i] = GUINT16_TO_LE (data_utf16[i]);
47+ }
48 }
49+ //field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL);
50+ field = g_utf16_to_utf8((gunichar2 *)data, (glong)(data_size>>1), NULL, NULL, NULL);
51+
52 }
53
54 break;