From ad019a1d0135320ebae9fca7214fbef0634ed3c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 17 Sep 2020 19:54:28 +0200 Subject: [PATCH] va: decoder: warn if decode fails on a surface 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: --- sys/va/gstvadecoder.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/va/gstvadecoder.c b/sys/va/gstvadecoder.c index af53517990..ec150ee82d 100644 --- a/sys/va/gstvadecoder.c +++ b/sys/va/gstvadecoder.c @@ -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; } }