mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
tsdemux: handle a NULL name in DVB short event descriptor
Resolves the warning: GStreamer-WARNING **: Trying to set NULL string on field 'title' on taglist. https://bugzilla.gnome.org/show_bug.cgi?id=771198
This commit is contained in:
parent
776a9470a0
commit
7713bb763e
1 changed files with 16 additions and 6 deletions
|
@ -1023,14 +1023,24 @@ mpegts_base_get_tags_from_eit (MpegTSBase * base, GstMpegtsSection * section)
|
|||
if ((desc =
|
||||
gst_mpegts_find_descriptor (event->descriptors,
|
||||
GST_MTS_DESC_DVB_SHORT_EVENT))) {
|
||||
gchar *name;
|
||||
gchar *name = NULL, *text = NULL;
|
||||
|
||||
if (gst_mpegts_descriptor_parse_dvb_short_event (desc, NULL, &name,
|
||||
NULL)) {
|
||||
&text)) {
|
||||
program->tags = gst_tag_list_new_empty ();
|
||||
if (name) {
|
||||
gst_tag_list_add (program->tags, GST_TAG_MERGE_APPEND,
|
||||
GST_TAG_TITLE, name, NULL);
|
||||
g_free (name);
|
||||
}
|
||||
if (text) {
|
||||
gst_tag_list_add (program->tags, GST_TAG_MERGE_APPEND,
|
||||
GST_TAG_DESCRIPTION, text, NULL);
|
||||
g_free (text);
|
||||
}
|
||||
/* FIXME : Is it correct to post an event duration as a GST_TAG_DURATION ??? */
|
||||
program->tags =
|
||||
gst_tag_list_new (GST_TAG_TITLE, name, GST_TAG_DURATION,
|
||||
event->duration * GST_SECOND, NULL);
|
||||
g_free (name);
|
||||
gst_tag_list_add (program->tags, GST_TAG_MERGE_APPEND,
|
||||
GST_TAG_DURATION, event->duration * GST_SECOND, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue