summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-01-20 14:16:56 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-01-23 18:52:00 +0100
commite6fb4c1cdc727c8f737979995cf51ad12ba5887a (patch)
treee7f50b6a45e67fd5c7748228fce46c8db206ae8f /tests
parentdb7a3b8d3e179b055ca1b793d711e12ba6cee025 (diff)
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.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test-filter.c6
1 files changed, 5 insertions, 1 deletions
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);
}