va: Fix error handling for decoder
authorMengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Tue, 12 Oct 2021 09:48:17 +0000 (17:48 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 14 Oct 2021 11:12:41 +0000 (11:12 +0000)
Need to check if va decoder is closed successfully.

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

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

index cf0d939..304a821 100644 (file)
@@ -119,7 +119,8 @@ gst_va_decoder_dispose (GObject * object)
 {
   GstVaDecoder *self = GST_VA_DECODER (object);
 
-  gst_va_decoder_close (self);
+  if (!gst_va_decoder_close (self))
+    GST_WARNING_OBJECT (self, "VaDecoder is not successfully closed");
 
   g_clear_pointer (&self->available_profiles, g_array_unref);
   gst_clear_object (&self->display);