summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-11-15 15:12:45 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2010-11-19 19:21:37 +0100
commitbd46298ca6384f5678ebe0a7b5b1144d741d6221 (patch)
treeeb0ec908a62db73c287eb52f2bc911d7f344f130
parent857efb4917d363280a5cb76f9050bbe618a4e464 (diff)
qtmux: use helper to set atom flags from given uint
-rw-r--r--gst/qtmux/atoms.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gst/qtmux/atoms.c b/gst/qtmux/atoms.c
index 89f47ee07..b7b4a8ccc 100644
--- a/gst/qtmux/atoms.c
+++ b/gst/qtmux/atoms.c
@@ -130,6 +130,14 @@ atom_full_free (AtomFull * full)
g_free (full);
}
+static void
+atom_full_set_flags_as_uint (AtomFull * full, guint32 flags_as_uint)
+{
+ full->flags[2] = flags_as_uint & 0xFF;
+ full->flags[1] = (flags_as_uint & 0xFF00) >> 8;
+ full->flags[0] = (flags_as_uint & 0xFF0000) >> 16;
+}
+
static AtomInfo *
build_atom_info_wrapper (Atom * atom, gpointer copy_func, gpointer free_func)
{
@@ -1134,9 +1142,7 @@ atom_tag_new (guint32 fourcc, guint32 flags_as_uint)
tag->header.type = fourcc;
atom_tag_data_init (&tag->data);
- tag->data.header.flags[2] = flags_as_uint & 0xFF;
- tag->data.header.flags[1] = (flags_as_uint & 0xFF00) >> 8;
- tag->data.header.flags[0] = (flags_as_uint & 0xFF0000) >> 16;
+ atom_full_set_flags_as_uint (&tag->data.header, flags_as_uint);
return tag;
}