mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
vaapivideocontext: context type can be rejected
Instead of calling g_return_val_if_fail() to check the context type, we should use a normal conditional, since it is possible that other context types can arrive and try to be assigned. Otherwise a critical log message is printed. This happens when we use playbin3 with vaapipostproc as video-filter. https://bugzilla.gnome.org/show_bug.cgi?id=777409
This commit is contained in:
parent
26fa4df958
commit
43d4f0bfb5
1 changed files with 5 additions and 2 deletions
|
@ -73,10 +73,13 @@ gst_vaapi_video_context_get_display (GstContext * context,
|
|||
GstVaapiDisplay ** display_ptr)
|
||||
{
|
||||
const GstStructure *structure;
|
||||
const gchar *type;
|
||||
|
||||
g_return_val_if_fail (GST_IS_CONTEXT (context), FALSE);
|
||||
g_return_val_if_fail (g_strcmp0 (gst_context_get_context_type (context),
|
||||
GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME) == 0, FALSE);
|
||||
|
||||
type = gst_context_get_context_type (context);
|
||||
if (g_strcmp0 (type, GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME))
|
||||
return FALSE;
|
||||
|
||||
structure = gst_context_get_structure (context);
|
||||
return gst_structure_get (structure, GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME,
|
||||
|
|
Loading…
Reference in a new issue