mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
ext/taglib/gsttaglibmux.c: Merge event tags and tag setter tags correctly (#339918). Also, don't leak taglist in case...
Original commit message from CVS: Patch by: James "Doc" Livingston <doclivingston gmail com> * ext/taglib/gsttaglibmux.c: (gst_tag_lib_mux_render_tag): Merge event tags and tag setter tags correctly (#339918). Also, don't leak taglist in case of an error.
This commit is contained in:
parent
5ab4a7dd42
commit
cb3848d245
3 changed files with 20 additions and 15 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-05-18 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: James "Doc" Livingston <doclivingston gmail com>
|
||||
|
||||
* ext/taglib/gsttaglibmux.c: (gst_tag_lib_mux_render_tag):
|
||||
Merge event tags and tag setter tags correctly (#339918). Also,
|
||||
don't leak taglist in case of an error.
|
||||
|
||||
2006-05-17 Edward Hervey <edward@fluendo.com>
|
||||
|
||||
* gst/law/mulaw-decode.c: (mulawdec_getcaps):
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 8eb9ea46137c34191bdbeca946ca4419ba573b51
|
||||
Subproject commit a5b66304e7abe1440a0f8b0ed232ffbc56e8f3de
|
|
@ -134,28 +134,23 @@ static GstBuffer *
|
|||
gst_tag_lib_mux_render_tag (GstTagLibMux * mux)
|
||||
{
|
||||
GstTagLibMuxClass *klass;
|
||||
GstTagMergeMode merge_mode;
|
||||
GstTagSetter *tagsetter;
|
||||
GstBuffer *buffer;
|
||||
GstTagSetter *tagsetter = GST_TAG_SETTER (mux);
|
||||
const GstTagList *tagsetter_tags;
|
||||
GstTagList *taglist;
|
||||
GstEvent *event;
|
||||
|
||||
if (mux->event_tags != NULL) {
|
||||
taglist = gst_tag_list_copy (mux->event_tags);
|
||||
} else {
|
||||
taglist = gst_tag_list_new ();
|
||||
}
|
||||
tagsetter = GST_TAG_SETTER (mux);
|
||||
|
||||
tagsetter_tags = gst_tag_setter_get_tag_list (tagsetter);
|
||||
if (tagsetter_tags) {
|
||||
GstTagMergeMode merge_mode;
|
||||
merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter);
|
||||
|
||||
merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter);
|
||||
GST_LOG_OBJECT (mux, "merging tags, merge mode = %d", merge_mode);
|
||||
GST_LOG_OBJECT (mux, "event tags: %" GST_PTR_FORMAT, taglist);
|
||||
GST_LOG_OBJECT (mux, "set tags: %" GST_PTR_FORMAT, tagsetter_tags);
|
||||
gst_tag_list_insert (taglist, tagsetter_tags, merge_mode);
|
||||
}
|
||||
GST_LOG_OBJECT (mux, "merging tags, merge mode = %d", merge_mode);
|
||||
GST_LOG_OBJECT (mux, "event tags: %" GST_PTR_FORMAT, mux->event_tags);
|
||||
GST_LOG_OBJECT (mux, "set tags: %" GST_PTR_FORMAT, tagsetter_tags);
|
||||
|
||||
taglist = gst_tag_list_merge (tagsetter_tags, mux->event_tags, merge_mode);
|
||||
|
||||
GST_LOG_OBJECT (mux, "final tags: %" GST_PTR_FORMAT, taglist);
|
||||
|
||||
|
@ -189,12 +184,14 @@ gst_tag_lib_mux_render_tag (GstTagLibMux * mux)
|
|||
no_vfunc:
|
||||
{
|
||||
GST_ERROR_OBJECT (mux, "Subclass does not implement render_tag vfunc!");
|
||||
gst_tag_list_free (taglist);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
render_error:
|
||||
{
|
||||
GST_ERROR_OBJECT (mux, "Failed to render tag");
|
||||
gst_tag_list_free (taglist);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue