libs: replace g_error with GST_ERROR

And handle those errors rather than halting.
This commit is contained in:
Víctor Manuel Jáquez Leal 2018-10-09 17:23:55 +02:00
parent 9132090182
commit bcd63f8021
2 changed files with 6 additions and 2 deletions

View file

@ -97,8 +97,9 @@ vaapi_image_is_linear (const VAImage * va_image)
data_size = 2 * (width * height + 2 * width2 * height2); data_size = 2 * (width * height + 2 * width2 * height2);
break; break;
default: default:
g_error ("FIXME: incomplete formats %" GST_FOURCC_FORMAT, GST_ERROR ("FIXME: incomplete formats %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (va_image->format.fourcc)); GST_FOURCC_ARGS (va_image->format.fourcc));
data_size = G_MAXUINT;
break; break;
} }
return va_image->data_size == data_size; return va_image->data_size == data_size;

View file

@ -31,6 +31,9 @@
#include <gobject/gvaluecollector.h> #include <gobject/gvaluecollector.h>
#include "gstvaapivalue.h" #include "gstvaapivalue.h"
#define DEBUG 1
#include "gstvaapidebug.h"
static gpointer static gpointer
default_copy_func (gpointer data) default_copy_func (gpointer data)
{ {
@ -185,7 +188,7 @@ build_enum_subset_values_from_mask (GstVaapiEnumSubset * subset, guint32 mask)
/* ERRORS */ /* ERRORS */
error_invalid_num_values: 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; return FALSE;
} }
} }