diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/simple-encoder.c | 7 | ||||
-rw-r--r-- | tests/test-filter.c | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/simple-encoder.c b/tests/simple-encoder.c index ae0c20de..b424d692 100644 --- a/tests/simple-encoder.c +++ b/tests/simple-encoder.c @@ -409,19 +409,22 @@ app_run (App * app) buffer_thread = g_thread_new ("get buffer thread", get_buffer_thread, app); while (1) { + GstVaapiSurfaceProxy *proxy; + GstVaapiSurface *surface; + if (!load_frame (app, image)) break; if (!gst_vaapi_image_unmap (image)) break; - GstVaapiSurfaceProxy *proxy = + proxy = gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL (pool)); if (!proxy) { g_warning ("Could not get surface proxy from pool."); break; } - GstVaapiSurface *surface = gst_vaapi_surface_proxy_get_surface (proxy); + surface = gst_vaapi_surface_proxy_get_surface (proxy); if (!surface) { g_warning ("Could not get surface from proxy."); break; diff --git a/tests/test-filter.c b/tests/test-filter.c index 05dfee9d..0f681e8d 100644 --- a/tests/test-filter.c +++ b/tests/test-filter.c @@ -246,12 +246,13 @@ parse_enum(const gchar *str, GType type, gint default_value, g_return_val_if_fail(out_value_ptr != NULL, FALSE); if (str) { + const GEnumValue *enum_value; GEnumClass * const enum_class = g_type_class_ref(type); + if (!enum_class) return FALSE; - const GEnumValue * const enum_value = - g_enum_get_value_by_nick(enum_class, str); + enum_value = g_enum_get_value_by_nick(enum_class, str); if (enum_value) out_value = enum_value->value; g_type_class_unref(enum_class); |