vabaseenc: Move out encoder validation from assertion.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 20 Sep 2022 11:38:26 +0000 (13:38 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Sep 2022 18:59:18 +0000 (18:59 +0000)
Assertion can be disabled at compilation time. Still it's important to
validate it the encoder object was opened by the subclass. This patch
removes the assertion and returns if the encoder is open.

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

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

index 5e5b8c5..b2a4fc6 100644 (file)
@@ -720,9 +720,7 @@ gst_va_base_enc_set_format (GstVideoEncoder * venc, GstVideoCodecState * state)
   }
 
   /* Sub class should open the encoder if reconfig succeeds. */
-  g_assert (gst_va_encoder_is_open (base->encoder));
-
-  return TRUE;
+  return gst_va_encoder_is_open (base->encoder);
 }
 
 static gboolean