summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2008-11-11 19:24:12 +0000
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2008-11-11 19:24:12 +0000
commit335402cd759bba89676a96afd336b69fb1ce54aa (patch)
tree5fd40b89bfc11b969a5c123e17b2c211c5ae77b5 /gst
parenta1d2af2cdb7b5d7de3bb7fdf50241229fc1761e0 (diff)
downloadgst-plugins-bad-335402cd759bba89676a96afd336b69fb1ce54aa.tar.gz
gst-plugins-bad-335402cd759bba89676a96afd336b69fb1ce54aa.tar.bz2
gst-plugins-bad-335402cd759bba89676a96afd336b69fb1ce54aa.zip
gst/qtmux/gstqtmux.c: Add some more safety/sanity checks in tag manipulation.
Original commit message from CVS: * gst/qtmux/gstqtmux.c: (gst_qt_mux_add_metadata_tags): Add some more safety/sanity checks in tag manipulation.
Diffstat (limited to 'gst')
-rw-r--r--gst/qtmux/gstqtmux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/qtmux/gstqtmux.c b/gst/qtmux/gstqtmux.c
index 9a181aa9..7eaf730d 100644
--- a/gst/qtmux/gstqtmux.c
+++ b/gst/qtmux/gstqtmux.c
@@ -360,9 +360,9 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list)
/* strings */
case G_TYPE_STRING:
{
- gchar *str;
+ gchar *str = NULL;
- if (!gst_tag_list_get_string (list, tag, &str))
+ if (!gst_tag_list_get_string (list, tag, &str) || !str)
break;
GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s",
GST_FOURCC_ARGS (fourcc), str);
@@ -400,13 +400,13 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list)
default:
{
if (gst_tag_get_type (tag) == GST_TYPE_DATE) {
- GDate *date;
+ GDate *date = NULL;
GDateYear year;
GDateMonth month;
GDateDay day;
gchar *str;
- if (!gst_tag_list_get_date (list, tag, &date))
+ if (!gst_tag_list_get_date (list, tag, &date) || !date)
break;
year = g_date_get_year (date);
month = g_date_get_month (date);