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.
This commit is contained in:
Stefan Kost 2008-06-12 12:14:38 +00:00
parent b3cfa35a6f
commit 8fc46085b3
2 changed files with 10 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2008-06-12 Stefan Kost <ensonic@users.sf.net>
* gst/avi/gstavimux.c:
Simplify code. gst_tag_list_merge() does the NULL checks. Add a FIXME
for a random constant in tagmuxing code.
2008-06-11 Stefan Kost <ensonic@users.sf.net>
* gst/debug/gsttaginject.c:

View file

@ -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;