[tracker] tracker-extract: Fix possible runtime warnings in GStreamer extractor
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Fix possible runtime warnings in GStreamer extractor
- Date: Thu, 8 Dec 2016 11:06:17 +0000 (UTC)
commit 117fd8b07492e3c9239e996c340a0c64b5562618
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Nov 28 22:16:14 2016 +0100
tracker-extract: Fix possible runtime warnings in GStreamer extractor
We don't NULL-check the GST_TAG_DATE_TIME tag content.
src/tracker-extract/tracker-extract-gstreamer.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-gstreamer.c b/src/tracker-extract/tracker-extract-gstreamer.c
index 9753377..c878c16 100644
--- a/src/tracker-extract/tracker-extract-gstreamer.c
+++ b/src/tracker-extract/tracker-extract-gstreamer.c
@@ -656,7 +656,8 @@ extractor_maybe_get_album_disc (MetadataExtractor *extractor,
gst_tag_list_get_string (tag_list, GST_TAG_ARTIST, &track_artist_temp);
gst_tag_list_get_date_time (tag_list, GST_TAG_DATE_TIME, &datetime_temp);
- album_datetime = gst_date_time_to_iso8601_string (datetime_temp);
+ if (datetime_temp)
+ album_datetime = gst_date_time_to_iso8601_string (datetime_temp);
album_artist = intern_artist (extractor, album_artist_name);
has_it = gst_tag_list_get_uint (tag_list, GST_TAG_ALBUM_VOLUME_NUMBER, &volume_number);
@@ -675,7 +676,7 @@ extractor_maybe_get_album_disc (MetadataExtractor *extractor,
extractor->media_art_title = album_title;
#endif
- gst_date_time_unref (datetime_temp);
+ g_clear_pointer (&datetime_temp, (GDestroyNotify) gst_date_time_unref);
g_free (album_artist_name);
g_free (album_datetime);
g_free (track_artist_temp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]