From e70a50e33053c9f85399fc6b881365e1cef11e94 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 7 Sep 2006 14:08:42 +0000 Subject: [PATCH] gst/asfdemux/gstasfdemux.c: Skip tags that are unknown (was producing an uninialized GValue). Original commit message from CVS: * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_get_gst_tag_from_tag_name), (gst_asf_demux_process_ext_content_desc): Skip tags that are unknown (was producing an uninialized GValue). --- ChangeLog | 7 +++++++ gst/asfdemux/gstasfdemux.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac6ad432fc..1af54febc0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-09-07 Stefan Kost + + * gst/asfdemux/gstasfdemux.c: + (gst_asf_demux_get_gst_tag_from_tag_name), + (gst_asf_demux_process_ext_content_desc): + Skip tags that are unknown (was producing an uninialized GValue). + 2006-09-01 Michael Smith * ext/a52dec/gsta52dec.c: (gst_a52dec_mode_get_type), diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c index 5ea25a773a..a9487a048b 100644 --- a/gst/asfdemux/gstasfdemux.c +++ b/gst/asfdemux/gstasfdemux.c @@ -1173,6 +1173,8 @@ gst_asf_demux_get_gst_tag_from_tag_name (const gchar * name_utf16le, return NULL; } + GST_DEBUG ("map tagname '%s'", name_utf8); + for (i = 0; i < G_N_ELEMENTS (tags); ++i) { if (strncmp (tags[i].asf_name, name_utf8, out) == 0) { g_free (name_utf8); @@ -1273,7 +1275,7 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 ** p_data, goto not_enough_data; gst_tag_name = gst_asf_demux_get_gst_tag_from_tag_name (name, name_len); - if (gst_tag_name != NULL) { + if (datatype && (gst_tag_name != NULL)) { switch (datatype) { case ASF_DEMUX_DATA_TYPE_UTF16LE_STRING:{ gchar *value_utf8; @@ -1338,7 +1340,7 @@ gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 ** p_data, return GST_FLOW_OK; - + /* Errors */ not_enough_data: { /* avoid compiler warning when disabling logging at compile time */