From e6fb4c1cdc727c8f737979995cf51ad12ba5887a Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Mon, 20 Jan 2014 14:16:56 +0100 Subject: tests: test-filter: fix "deinterlace" option parse. Default to GST_VAAPI_DEINTERLACE_METHOD_NONE if no "deinterlace" option string was provided, i.e. if it remained set to NULL. --- tests/test-filter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test-filter.c b/tests/test-filter.c index 52452b31..8e19fab7 100755 --- a/tests/test-filter.c +++ b/tests/test-filter.c @@ -296,7 +296,11 @@ parse_deinterlace(const gchar *str, GstVaapiDeinterlaceMethod *deinterlace_ptr) { g_return_val_if_fail(deinterlace_ptr != NULL, FALSE); - return str && parse_enum(str, GST_VAAPI_TYPE_DEINTERLACE_METHOD, + if (!str) { + *deinterlace_ptr = GST_VAAPI_DEINTERLACE_METHOD_NONE; + return TRUE; + } + return parse_enum(str, GST_VAAPI_TYPE_DEINTERLACE_METHOD, GST_VAAPI_DEINTERLACE_METHOD_NONE, (gint *)deinterlace_ptr); } -- cgit v1.2.1