$(GST_BASE_CFLAGS) $(GST_CFLAGS)
libgstmpegpsdemux_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) \
+ -lgstpbutils-$(GST_API_VERSION) \
$(GST_BASE_LIBS) $(GST_LIBS)
libgstmpegpsdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstmpegpsdemux_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
#include <string.h>
+#include <gst/tag/tag.h>
+#include <gst/pbutils/pbutils.h>
+
#include "gstmpegdefs.h"
#include "gstmpegdemux.h"
g_free (stream_id);
gst_pad_set_caps (stream->pad, caps);
+
+ if (!stream->pending_tags)
+ stream->pending_tags = gst_tag_list_new_empty ();
+ gst_pb_utils_add_codec_description_to_tag_list (stream->pending_tags, NULL,
+ caps);
+
gst_caps_unref (caps);
GST_DEBUG_OBJECT (demux, "create pad %s, caps %" GST_PTR_FORMAT, name, caps);
g_free (name);
g_snprintf (cur_stream_name, 32, "audio-%d-language", i);
lang_code = gst_structure_get_string (structure, cur_stream_name);
if (lang_code) {
- GstTagList *list = gst_tag_list_new_empty ();
+ GstTagList *list = temp->pending_tags;
+ if (!list)
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_LANGUAGE_CODE, lang_code, NULL);
temp->pending_tags = list;
g_snprintf (cur_stream_name, 32, "subpicture-%d-language", i);
lang_code = gst_structure_get_string (structure, cur_stream_name);
if (lang_code) {
- GstTagList *list = gst_tag_list_new_empty ();
+ GstTagList *list = temp->pending_tags;
+ if (!list)
+ list = gst_tag_list_new_empty ();
gst_tag_list_add (list, GST_TAG_MERGE_REPLACE,
GST_TAG_LANGUAGE_CODE, lang_code, NULL);
temp->pending_tags = list;