From bcd63f8021158025ec56affc94aa8279daed02c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 9 Oct 2018 17:23:55 +0200 Subject: [PATCH] libs: replace g_error with GST_ERROR And handle those errors rather than halting. --- gst-libs/gst/vaapi/gstvaapiimage.c | 3 ++- gst-libs/gst/vaapi/gstvaapivalue.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapiimage.c b/gst-libs/gst/vaapi/gstvaapiimage.c index d1d7366852..e4cb590579 100644 --- a/gst-libs/gst/vaapi/gstvaapiimage.c +++ b/gst-libs/gst/vaapi/gstvaapiimage.c @@ -97,8 +97,9 @@ vaapi_image_is_linear (const VAImage * va_image) data_size = 2 * (width * height + 2 * width2 * height2); break; default: - g_error ("FIXME: incomplete formats %" GST_FOURCC_FORMAT, + GST_ERROR ("FIXME: incomplete formats %" GST_FOURCC_FORMAT, GST_FOURCC_ARGS (va_image->format.fourcc)); + data_size = G_MAXUINT; break; } return va_image->data_size == data_size; diff --git a/gst-libs/gst/vaapi/gstvaapivalue.c b/gst-libs/gst/vaapi/gstvaapivalue.c index 2185e7ea63..d5e192af99 100644 --- a/gst-libs/gst/vaapi/gstvaapivalue.c +++ b/gst-libs/gst/vaapi/gstvaapivalue.c @@ -31,6 +31,9 @@ #include #include "gstvaapivalue.h" +#define DEBUG 1 +#include "gstvaapidebug.h" + static gpointer default_copy_func (gpointer data) { @@ -185,7 +188,7 @@ build_enum_subset_values_from_mask (GstVaapiEnumSubset * subset, guint32 mask) /* ERRORS */ error_invalid_num_values: { - g_error ("invalid number of static values for `%s'", subset->type_name); + GST_ERROR ("invalid number of static values for `%s'", subset->type_name); return FALSE; } }