gst-libs/gst/tag/tags.c: Don't drop the last byte of image tags if they're not an URI list.

Original commit message from CVS:
* gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
Don't drop the last byte of image tags if they're not an URI list.
Fixes bug #556066.
This commit is contained in:
Sebastian Dröge 2008-10-13 08:15:13 +00:00
parent d0d588ff6f
commit 796fdbdf17
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2008-10-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst-libs/gst/tag/tags.c: (gst_tag_image_data_to_image_buffer):
Don't drop the last byte of image tags if they're not an URI list.
Fixes bug #556066.
2008-10-13 Sebastian Dröge <sebastian.droege@collabora.co.uk> 2008-10-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/typefind/gsttypefindfunctions.c: (flac_type_find): * gst/typefind/gsttypefindfunctions.c: (flac_type_find):

View file

@ -410,7 +410,7 @@ gst_tag_image_data_to_image_buffer (const guint8 * image_data,
memcpy (GST_BUFFER_DATA (image), image_data, image_data_len); memcpy (GST_BUFFER_DATA (image), image_data, image_data_len);
GST_BUFFER_DATA (image)[image_data_len] = '\0'; GST_BUFFER_DATA (image)[image_data_len] = '\0';
GST_BUFFER_SIZE (image) = image_data_len; GST_BUFFER_SIZE (image) = image_data_len + 1;
/* Find GStreamer media type, can't trust declared type */ /* Find GStreamer media type, can't trust declared type */
caps = gst_type_find_helper_for_buffer (NULL, image, NULL); caps = gst_type_find_helper_for_buffer (NULL, image, NULL);
@ -434,7 +434,7 @@ gst_tag_image_data_to_image_buffer (const guint8 * image_data,
* to keep the original size of the image * to keep the original size of the image
*/ */
if (!g_str_equal (name, "text/uri-list")) if (!g_str_equal (name, "text/uri-list"))
GST_BUFFER_SIZE (image) = GST_BUFFER_SIZE (image) - 1; GST_BUFFER_SIZE (image) = image_data_len;
if (image_type != GST_TAG_IMAGE_TYPE_NONE) { if (image_type != GST_TAG_IMAGE_TYPE_NONE) {
GST_LOG ("Setting image type: %d", image_type); GST_LOG ("Setting image type: %d", image_type);