summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux
diff options
context:
space:
mode:
authorMarco Ballesio <marco.ballesio@nokia.com>2009-04-29 15:58:10 +0300
committerRené Stadler <mail@renestadler.de>2009-05-06 00:16:37 +0300
commit8e7273076d14444d2fa5ba764bbc09ad4fefa6d4 (patch)
tree024a8b710615173c94a282a1d61271d02dbd8971 /gst/qtdemux
parent439ca2c7959f6d72aa649b6d676ea4b6caf2c043 (diff)
qtdemux: fix byte order swapping in 3GPP classification entity tag
Fixes #580746.
Diffstat (limited to 'gst/qtdemux')
-rw-r--r--gst/qtdemux/qtdemux.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 775626ee..e74712fe 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -4492,12 +4492,12 @@ qtdemux_tag_add_classification (GstQTDemux * qtdemux, const char *tag,
{
int offset;
char *tag_str = NULL;
- guint32 entity;
+ guint8 *entity;
guint16 table;
offset = 12;
- entity = QT_FOURCC ((guint8 *) node->data + offset);
+ entity = (guint8 *) node->data + offset;
offset += 4;
table = QT_UINT16 ((guint8 *) node->data + offset);
@@ -4510,8 +4510,11 @@ qtdemux_tag_add_classification (GstQTDemux * qtdemux, const char *tag,
* XXXX: classification entity, fixed length 4 chars.
* Y[YYYY]: classification table, max 5 chars.
*/
- tag_str = g_strdup_printf ("%" GST_FOURCC_FORMAT "://%u/%s",
- GST_FOURCC_ARGS (entity), table, (char *) node->data + offset);
+ tag_str = g_strdup_printf ("----://%u/%s",
+ table, (char *) node->data + offset);
+
+ /* memcpy To be sure we're preserving byte order */
+ memcpy (tag_str, entity, 4);
GST_DEBUG_OBJECT (qtdemux, "classification info: %s", tag_str);
gst_tag_list_add (qtdemux->tag_list, GST_TAG_MERGE_APPEND, tag,