2008-06-20 Sebastian Dröge <slomo@circular-chaos.org>
+ * gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
+ Don't increase the size of non-string image buffers by one as this
+ might in theory confuse decoders. Still increase it by one for string
+ image buffers to append '\0'.
+
+2008-06-20 Sebastian Dröge <slomo@circular-chaos.org>
+
Patch by: Antoine Tremblay <hexa00 at gmail dot com>
* gst/gdp/gstgdppay.c: (gst_gdp_pay_reset):
gst_tag_image_type_get_type (void)
{
static GType id;
+
static GOnce once = G_ONCE_INIT;
g_once (&once, (GThreadFunc) register_tag_image_type_enum, &id);
gst_tag_image_type_is_valid (GstTagImageType type)
{
GEnumClass *klass;
+
gboolean res;
klass = g_type_class_ref (gst_tag_image_type_get_type ());
const gchar ** env_vars)
{
const gchar *cur_loc = NULL;
+
gsize bytes_read;
+
gchar *utf8 = NULL;
g_return_val_if_fail (data != NULL, NULL);
guint image_data_len, GstTagImageType image_type)
{
const gchar *name;
+
GstBuffer *image;
+
GstCaps *caps;
g_return_val_if_fail (image_data != NULL, NULL);
goto error;
}
+ /* Decrease size by 1 if we don't have an URI list
+ * to keep the original size of the image
+ */
+ if (!g_str_equal (name, "text/uri-list"))
+ GST_BUFFER_SIZE (image) = GST_BUFFER_SIZE (image) - 1;
+
if (image_type != GST_TAG_IMAGE_TYPE_NONE) {
GST_LOG ("Setting image type: %d", image_type);
caps = gst_caps_make_writable (caps);