Don't do void pointer arithmetic

This commit is contained in:
Jan Schmidt 2009-01-30 17:34:45 +00:00
parent 367f9123de
commit fea851d100

View file

@ -3513,8 +3513,8 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
break;
GST_DEBUG_OBJECT (qtdemux, "found colr");
/* try to extract colour space info */
if (QT_UINT8 (colr->data + 8) == 1) {
switch (QT_UINT32 (colr->data + 11)) {
if (QT_UINT8 ((guint8 *) colr->data + 8) == 1) {
switch (QT_UINT32 ((guint8 *) colr->data + 11)) {
case 16:
fourcc = GST_MAKE_FOURCC ('s', 'R', 'G', 'B');
break;
@ -3539,7 +3539,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
/* indicate possible fields in caps */
if (field) {
data = field->data + 8;
data = (guint8 *) field->data + 8;
if (*data != 1)
gst_caps_set_simple (stream->caps, "fields", G_TYPE_INT,
(gint) * data, NULL);
@ -4041,8 +4041,8 @@ qtdemux_tag_add_covr (GstQTDemux * qtdemux, const char *tag1, const char *dummy,
type = QT_UINT32 ((guint8 *) data->data + 8);
GST_DEBUG_OBJECT (qtdemux, "have covr tag, type=%d,len=%d", type, len);
if ((type == 0x0000000d || type == 0x0000000e) && len > 16) {
if ((buf = gst_tag_image_data_to_image_buffer (data->data + 16, len - 16,
GST_TAG_IMAGE_TYPE_NONE))) {
if ((buf = gst_tag_image_data_to_image_buffer ((guint8 *) data->data + 16,
len - 16, GST_TAG_IMAGE_TYPE_NONE))) {
GST_DEBUG_OBJECT (qtdemux, "adding tag size %d", len - 16);
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_REPLACE,
tag1, buf, NULL);