mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
filter: fix first-time operation lookup.
Fix first-time operation lookup through find_operation() if the set of supported operations was not initially determined through the gst_vaapi_filter_get_operations() helper function. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
This commit is contained in:
parent
3e4d8d27b3
commit
e05e65e349
1 changed files with 5 additions and 2 deletions
|
@ -628,12 +628,14 @@ error:
|
|||
g_ptr_array_unref(default_ops);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Determine the set of supported VPP operations by the specific
|
||||
filter, or known to this library if filter is NULL */
|
||||
static GPtrArray *
|
||||
ensure_operations(GstVaapiFilter *filter)
|
||||
{
|
||||
#if USE_VA_VPP
|
||||
GPtrArray *ops;
|
||||
|
||||
if (filter && filter->operations)
|
||||
|
@ -643,8 +645,9 @@ ensure_operations(GstVaapiFilter *filter)
|
|||
if (!ops)
|
||||
return NULL;
|
||||
return filter ? get_operations_ordered(filter, ops) : ops;
|
||||
}
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Find whether the VPP operation is supported or not */
|
||||
GstVaapiFilterOpData *
|
||||
|
@ -652,7 +655,7 @@ find_operation(GstVaapiFilter *filter, GstVaapiFilterOp op)
|
|||
{
|
||||
guint i;
|
||||
|
||||
if (!filter->operations)
|
||||
if (!ensure_operations(filter))
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < filter->operations->len; i++) {
|
||||
|
|
Loading…
Reference in a new issue