Commit b009126f authored by nightuser's avatar nightuser

tracker-extract-gstreamer.c: Set empty tags list if no tags were found

If entry doesn't has tags then `tracker_toc_add_entry` receives NULL
instead of the tag list. But this function immediately tries to make a
reference to the tag list and fails on NULL pointer. And every function
in `tracker-cue-sheet.c` assumes that the list is non-NULL.

Now it creates empty tag list if an entry doesn't contain tags. It
shouldn't have any impact since in normal case tag list is copied.
parent ad3bff34
......@@ -385,12 +385,14 @@ translate_discoverer_toc (GstToc *gst_toc)
if (tags) {
copy = gst_tag_list_copy (tags);
} else {
copy = gst_tag_list_new_empty ();
}
if (gst_tag_list_get_tag_size (copy, GST_TAG_TRACK_NUMBER) == 0) {
gst_tag_list_add (copy, GST_TAG_MERGE_REPLACE,
GST_TAG_TRACK_NUMBER, i + 1,
NULL);
}
if (gst_tag_list_get_tag_size (copy, GST_TAG_TRACK_NUMBER) == 0) {
gst_tag_list_add (copy, GST_TAG_MERGE_REPLACE,
GST_TAG_TRACK_NUMBER, i + 1,
NULL);
}
gst_toc_entry_get_start_stop_times (entry, &start, &stop);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment