mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
gst/quicktime/gstqtmux.c: Add some more safety/sanity checks in tag manipulation.
Original commit message from CVS: * gst/quicktime/gstqtmux.c: (gst_qt_mux_add_metadata_tags): Add some more safety/sanity checks in tag manipulation.
This commit is contained in:
parent
c991a04a93
commit
6b15001dc5
1 changed files with 4 additions and 4 deletions
|
@ -360,9 +360,9 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list)
|
||||||
/* strings */
|
/* strings */
|
||||||
case G_TYPE_STRING:
|
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;
|
break;
|
||||||
GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s",
|
GST_DEBUG_OBJECT (qtmux, "Adding tag %" GST_FOURCC_FORMAT " -> %s",
|
||||||
GST_FOURCC_ARGS (fourcc), str);
|
GST_FOURCC_ARGS (fourcc), str);
|
||||||
|
@ -400,13 +400,13 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list)
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (gst_tag_get_type (tag) == GST_TYPE_DATE) {
|
if (gst_tag_get_type (tag) == GST_TYPE_DATE) {
|
||||||
GDate *date;
|
GDate *date = NULL;
|
||||||
GDateYear year;
|
GDateYear year;
|
||||||
GDateMonth month;
|
GDateMonth month;
|
||||||
GDateDay day;
|
GDateDay day;
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
if (!gst_tag_list_get_date (list, tag, &date))
|
if (!gst_tag_list_get_date (list, tag, &date) || !date)
|
||||||
break;
|
break;
|
||||||
year = g_date_get_year (date);
|
year = g_date_get_year (date);
|
||||||
month = g_date_get_month (date);
|
month = g_date_get_month (date);
|
||||||
|
|
Loading…
Reference in a new issue