va: Avoid unused variable if logging is disabled.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 24 May 2022 12:47:43 +0000 (14:47 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 24 May 2022 19:07:47 +0000 (19:07 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2478>

subprojects/gst-plugins-bad/sys/va/plugin.c

index edc4425..dc8fbd1 100644 (file)
@@ -159,12 +159,6 @@ plugin_register_encoders (GstPlugin * plugin, GstVaDevice * device,
 {
   GHashTableIter iter;
   gpointer key, value;
-  const gchar *str;
-
-  if (entrypoint == VAEntrypointEncSliceLP)
-    str = "low power ";
-  else
-    str = "";
 
   g_hash_table_iter_init (&iter, encoders);
   while (g_hash_table_iter_next (&iter, &key, &value)) {
@@ -179,7 +173,8 @@ plugin_register_encoders (GstPlugin * plugin, GstVaDevice * device,
             &srccaps, &sinkcaps))
       continue;
 
-    GST_LOG ("%d encoder %scodec: %" GST_FOURCC_FORMAT, profiles->len, str,
+    GST_LOG ("%d encoder %scodec: %" GST_FOURCC_FORMAT, profiles->len,
+        (entrypoint == VAEntrypointEncSliceLP) ? "low power " : "",
         GST_FOURCC_ARGS (codec));
     GST_LOG ("sink caps: %" GST_PTR_FORMAT, sinkcaps);
     GST_LOG ("src caps: %" GST_PTR_FORMAT, srccaps);