2008-10-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * libs/gst/base/gstbytereader.c: (gst_byte_reader_get_uint24_le),
+ (gst_byte_reader_get_uint24_be), (gst_byte_reader_get_int24_le),
+ (gst_byte_reader_get_int24_be), (gst_byte_reader_peek_uint24_le),
+ (gst_byte_reader_peek_uint24_be), (gst_byte_reader_peek_int24_le),
+ (gst_byte_reader_peek_int24_be):
+ Use new GST_READ_UINT24_(LE|BE) macros.
+
+2008-10-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* docs/gst/gstreamer-sections.txt:
* gst/gstutils.h:
Always use the unaligned variants of GST_READ_UINT* and GST_WRITE_UINT*
if (reader->byte + 3 > reader->size)
return FALSE;
- *val =
- (reader->data[reader->byte] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte + 2] << 16));
+ *val = GST_READ_UINT24_LE (&reader->data[reader->byte]);
reader->byte += 3;
return TRUE;
}
if (reader->byte + 3 > reader->size)
return FALSE;
- *val =
- (reader->data[reader->byte + 2] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte] << 16));
+ *val = GST_READ_UINT24_BE (&reader->data[reader->byte]);
reader->byte += 3;
return TRUE;
}
if (reader->byte + 3 > reader->size)
return FALSE;
- ret =
- (reader->data[reader->byte] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte + 2] << 16));
-
+ ret = GST_READ_UINT24_LE (&reader->data[reader->byte]);
if (ret & 0x00800000)
ret |= 0xff000000;
if (reader->byte + 3 > reader->size)
return FALSE;
- ret =
- (reader->data[reader->byte + 2] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte] << 16));
+ ret = GST_READ_UINT24_BE (&reader->data[reader->byte]);
if (ret & 0x00800000)
ret |= 0xff000000;
if (reader->byte + 3 > reader->size)
return FALSE;
- *val =
- (reader->data[reader->byte] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte + 2] << 16));
+ *val = GST_READ_UINT24_LE (&reader->data[reader->byte]);
return TRUE;
}
if (reader->byte + 3 > reader->size)
return FALSE;
- *val =
- (reader->data[reader->byte + 2] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte] << 16));
+ *val = GST_READ_UINT24_BE (&reader->data[reader->byte]);
return TRUE;
}
if (reader->byte + 3 > reader->size)
return FALSE;
- ret =
- (reader->data[reader->byte] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte + 2] << 16));
-
+ ret = GST_READ_UINT24_LE (&reader->data[reader->byte]);
if (ret & 0x00800000)
ret |= 0xff000000;
if (reader->byte + 3 > reader->size)
return FALSE;
- ret =
- (reader->data[reader->byte + 2] | (reader->data[reader->byte +
- 1] << 8) | (reader->data[reader->byte] << 16));
+ ret = GST_READ_UINT24_BE (&reader->data[reader->byte]);
if (ret & 0x00800000)
ret |= 0xff000000;