+2004-05-11 Ronald Bultje <rbultje@ronald.bitfreak.net>
+
+ * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_comment):
+ Fix some odd cases and fix BE metadata parsing of unicode16 text.
+
2004-05-11 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/switch/gstswitch.c: (gst_switch_release_pad),
GST_TAG_COMMENT, NULL /* ? */
};
guint16 *lengths = (guint16 *) & object;
- gint i;
+ gint i, n;
gsize in, out;
GstTagList *taglist;
const GList *padlist;
("Comment lengths: title=%d author=%d copyright=%d description=%d rating=%d",
object.title_length, object.author_length, object.copyright_length,
object.description_length, object.rating_length);
- g_print ("comment\n");
for (i = 0; i < 5; i++) {
/* might be just '/0', '/0'... */
if (lengths[i] > 2 && lengths[i] % 2 == 0) {
continue;
/* convert to UTF-8 */
+ for (n = 0; n < lengths[i] / 2 - 1; n++)
+ ((gint16 *) data)[n] = GUINT16_FROM_LE (((gint16 *) data)[n]);
utf8_comments[i] = g_convert (data, lengths[i],
"UTF-8", "Unicode", &in, &out, NULL);
+ } else {
+ if (lengths[i] > 0 && !gst_bytestream_flush (bs, lengths[i]))
+ goto fail;
}
}