Replacing GstVaapiDisplay during rendering might be hiding problems
at some cases, even though it's safe currently since we use cache
of GstVaapidisplay.
Play safe by failing if this happens.
https://bugzilla.gnome.org/show_bug.cgi?id=766704
return ret;
meta = gst_buffer_get_vaapi_video_meta (buffer);
- GST_VAAPI_PLUGIN_BASE_DISPLAY_REPLACE (sink,
- gst_vaapi_video_meta_get_display (meta));
+ if (gst_vaapi_video_meta_get_display (meta) !=
+ GST_VAAPI_PLUGIN_BASE_DISPLAY (sink))
+ goto different_display;
proxy = gst_vaapi_video_meta_get_surface_proxy (meta);
if (!proxy)
ret = GST_FLOW_ERROR;
goto done;
}
+
+different_display:
+ {
+ GST_WARNING_OBJECT (sink, "incoming surface has different VAAPI Display");
+ ret = GST_FLOW_ERROR;
+ goto done;
+ }
}
static GstFlowReturn