Commit 711d7fcb authored by Sam Thursfield's avatar Sam Thursfield

tracker-writeback-gstreamer: Fix unused variable warnings

Move #ifdef to avoid warnings when building with GStreamer <= 1.16

    ../src/tracker-writeback/tracker-writeback-gstreamer.c: In function ‘writeback_gstreamer_write_file_metadata’:
    ../src/tracker-writeback/tracker-writeback-gstreamer.c:954:32: warning: variable ‘algorithm’ set but not used [-Wunused-but-set-variable]
      954 |    const gchar *value = NULL, *algorithm;
          |                                ^~~~~~~~~
    ../src/tracker-writeback/tracker-writeback-gstreamer.c:954:17: warning: variable ‘value’ set but not used [-Wunused-but-set-variable]
      954 |    const gchar *value = NULL, *algorithm;
          |                 ^~~~~
parent 1ededf84
Pipeline #194269 passed with stages
in 7 minutes and 40 seconds
......@@ -949,6 +949,7 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile *writeback,
handle_musicbrainz_tags (resource, prop, element, mb_tags);
}
#ifdef GST_TAG_ACOUSTID_FINGERPRINT
if (g_strcmp0 (prop, "nfo:hasHash") == 0) {
TrackerResource *hash;
const gchar *value = NULL, *algorithm;
......@@ -962,15 +963,14 @@ writeback_gstreamer_write_file_metadata (TrackerWritebackFile *writeback,
"nfo:hashValue");
}
#ifdef GST_TAG_ACOUSTID_FINGERPRINT
if (value && algorithm && g_strcmp0 (algorithm, "chromaprint") == 0) {
g_value_init (&val, G_TYPE_STRING);
g_value_set_string (&val, value);
writeback_gstreamer_set (element, GST_TAG_ACOUSTID_FINGERPRINT, &val);
g_value_unset (&val);
}
#endif
}
#endif
}
writeback_gstreamer_save (element, file, error);
......
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