vabaseenc: Scope error bail out.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 11 Aug 2022 10:50:27 +0000 (12:50 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 26 Oct 2022 08:19:32 +0000 (08:19 +0000)
Though this is not enforced by the GStreamer code style, it's clearer
to add a nested scope for error handling using label/goto.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3063>

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

index 4b5096d..7a10381 100644 (file)
@@ -591,9 +591,11 @@ error_encode:
     return ret;
   }
 error_push_buffer:
-  GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
-      ("Failed to push the buffer."), (NULL));
-  return ret;
+  {
+    GST_ELEMENT_ERROR (venc, STREAM, ENCODE,
+        ("Failed to push the buffer."), (NULL));
+    return ret;
+  }
 }
 
 static GstFlowReturn