diff options
author | Stefan Kost <ensonic@users.sourceforge.net> | 2008-06-12 12:14:38 +0000 |
---|---|---|
committer | Stefan Kost <ensonic@users.sourceforge.net> | 2008-06-12 12:14:38 +0000 |
commit | 8fc46085b319c00582dd2c7d3b7550cc2a5d8057 (patch) | |
tree | 020530b4aed71715b740596d94fdf4227ddbd747 /gst | |
parent | b3cfa35a6f0eb46f34b649b0e5996611422d5c9c (diff) |
gst/avi/gstavimux.c: Simplify code. gst_tag_list_merge() does the NULL checks. Add a FIXME for a random constant in t...
Original commit message from CVS:
* gst/avi/gstavimux.c:
Simplify code. gst_tag_list_merge() does the NULL checks. Add a FIXME
for a random constant in tagmuxing code.
Diffstat (limited to 'gst')
-rw-r--r-- | gst/avi/gstavimux.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gst/avi/gstavimux.c b/gst/avi/gstavimux.c index 23d97286..e6d2c061 100644 --- a/gst/avi/gstavimux.c +++ b/gst/avi/gstavimux.c @@ -940,20 +940,16 @@ gst_avi_mux_riff_get_avi_header (GstAviMux * avimux) /* need to take snapshot of tags now */ iface_tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (avimux)); if ((iface_tags || avimux->tags) && !avimux->tags_snap) { - if (iface_tags && avimux->tags) { - tags = gst_tag_list_merge (iface_tags, avimux->tags, - GST_TAG_MERGE_APPEND); - } else if (iface_tags) { - tags = gst_tag_list_copy (iface_tags); - } else { - tags = gst_tag_list_copy (avimux->tags); - } + /* gst_tag_list_merge() will handle NULL for either or both lists fine */ + tags = gst_tag_list_merge (iface_tags, avimux->tags, + gst_tag_setter_get_tag_merge_mode (GST_TAG_SETTER (avimux))); gst_tag_list_add (tags, GST_TAG_MERGE_REPLACE, GST_TAG_ENCODER, PACKAGE_STRING " AVI muxer", NULL); } else { tags = avimux->tags_snap; } avimux->tags_snap = tags; + /* FIXME: that should be the strlen of all tags + header sizes */ if (avimux->tags_snap) size += 1024; |