va: decoder: warn if decode fails on a surface
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Thu, 17 Sep 2020 17:54:28 +0000 (19:54 +0200)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sat, 19 Sep 2020 12:32:13 +0000 (14:32 +0200)
Instead of logging error if a step fails, it logs a warning message
reducing the noise and obeying the rule for errors since the program
doesn't end

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1584>

sys/va/gstvadecoder.c

index af53517..ec150ee 100644 (file)
@@ -582,7 +582,7 @@ gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
   status = vaBeginPicture (dpy, self->context, pic->surface);
   gst_va_display_unlock (self->display);
   if (status != VA_STATUS_SUCCESS) {
-    GST_ERROR_OBJECT (self, "vaBeginPicture: %s", vaErrorStr (status));
+    GST_WARNING_OBJECT (self, "vaBeginPicture: %s", vaErrorStr (status));
     goto fail_end_pic;
   }
 
@@ -591,7 +591,7 @@ gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
       (VABufferID *) pic->buffers->data, pic->buffers->len);
   gst_va_display_unlock (self->display);
   if (status != VA_STATUS_SUCCESS) {
-    GST_ERROR_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
+    GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
     goto fail_end_pic;
   }
 
@@ -600,7 +600,7 @@ gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
       (VABufferID *) pic->slices->data, pic->slices->len);
   gst_va_display_unlock (self->display);
   if (status != VA_STATUS_SUCCESS) {
-    GST_ERROR_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
+    GST_WARNING_OBJECT (self, "vaRenderPicture: %s", vaErrorStr (status));
     goto fail_end_pic;
   }
 
@@ -608,7 +608,7 @@ gst_va_decoder_decode (GstVaDecoder * self, GstVaDecodePicture * pic)
   status = vaEndPicture (dpy, self->context);
   gst_va_display_unlock (self->display);
   if (status != VA_STATUS_SUCCESS) {
-    GST_ERROR_OBJECT (self, "vaEndPicture: %s", vaErrorStr (status));
+    GST_WARNING_OBJECT (self, "vaEndPicture: %s", vaErrorStr (status));
     goto bail;
   }
 
@@ -624,8 +624,6 @@ fail_end_pic:
     gst_va_display_lock (self->display);
     status = vaEndPicture (dpy, self->context);
     gst_va_display_unlock (self->display);
-    if (status != VA_STATUS_SUCCESS)
-      GST_ERROR_OBJECT (self, "vaEndPicture: %s", vaErrorStr (status));
     goto bail;
   }
 }