diff options
author | Hyunjun Ko <zzoon@igalia.com> | 2017-07-05 15:32:43 +0900 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-07-26 14:21:54 +0200 |
commit | 736478d2a76caee872acd7980f593fe0c9b0b599 (patch) | |
tree | a08e7dc03480e4cce3fb345cec7f2b90c33781c0 /gst | |
parent | b8265db2600e123ca921d710ff73b7cd3b330ede (diff) |
vaapisink: fail if surface display is different
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
Diffstat (limited to 'gst')
-rw-r--r-- | gst/vaapi/gstvaapisink.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gst/vaapi/gstvaapisink.c b/gst/vaapi/gstvaapisink.c index d01c7277..96ca6748 100644 --- a/gst/vaapi/gstvaapisink.c +++ b/gst/vaapi/gstvaapisink.c @@ -1408,8 +1408,9 @@ gst_vaapisink_show_frame_unlocked (GstVaapiSink * sink, GstBuffer * src_buffer) 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) @@ -1491,6 +1492,13 @@ no_surface: 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 |