jpegparse: fix exif frame size

Skip the correct number of bytes when reading exif
data

Fixes #623854
This commit is contained in:
Víctor Manuel Jáquez Leal 2010-07-08 17:58:16 +02:00 committed by Thiago Santos
parent c15b64a515
commit 1d57953496

View file

@ -557,7 +557,7 @@ gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
if (!strcmp (id_str, "Exif")) { if (!strcmp (id_str, "Exif")) {
const guint8 *exif_data = NULL; const guint8 *exif_data = NULL;
guint exif_size = size - 2; guint exif_size = size - 2 - 6; /* 6 bytes for "Exif\0\0 id" */
GstTagList *tags; GstTagList *tags;
GstBuffer *buf; GstBuffer *buf;
@ -582,7 +582,7 @@ gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
marker, id_str, size - 2); marker, id_str, size - 2);
} else if (!strcmp (id_str, "http://ns.adobe.com/xap/1.0/")) { } else if (!strcmp (id_str, "http://ns.adobe.com/xap/1.0/")) {
const guint8 *xmp_data = NULL; const guint8 *xmp_data = NULL;
guint xmp_size = size - 2 - 29; guint xmp_size = size - 2 - 29; /* 29 bytes for the id */
GstTagList *tags; GstTagList *tags;
GstBuffer *buf; GstBuffer *buf;