summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWangfei <fei.w.wang@intel.com>2019-01-15 14:33:11 +0800
committerWangfei <fei.w.wang@intel.com>2019-01-15 14:48:19 +0800
commit98c32df8308296ffe480f22f880b302ce234f0de (patch)
tree7d4d2404dd9e1341ffa9724d939f895876daf310
parent14587eb8e86c44a0cacc6c1da99ab9ab15290247 (diff)
vaapipostproc: before set surface proxy, check if it already been created and exist.
Fix the deinterlace black frame when playing with glimagesink: gst-launch-1.0 filesrc location=test.264 ! h264parse ! vaapih264dec \ ! vaapipostproc deinterlace-mode=1 deinterlace-method=1 ! glimagesink
-rw-r--r--gst/vaapi/gstvaapipostproc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index 24d93f69..55e3a566 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -723,13 +723,15 @@ gst_vaapipostproc_process_vpp (GstBaseTransform * trans, GstBuffer * inbuf,
if (!outbuf_meta)
goto error_create_meta;
- proxy =
- gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL
- (postproc->filter_pool));
- if (!proxy)
- goto error_create_proxy;
- gst_vaapi_video_meta_set_surface_proxy (outbuf_meta, proxy);
- gst_vaapi_surface_proxy_unref (proxy);
+ if (!gst_vaapi_video_meta_get_surface_proxy (outbuf_meta)) {
+ proxy =
+ gst_vaapi_surface_proxy_new_from_pool (GST_VAAPI_SURFACE_POOL
+ (postproc->filter_pool));
+ if (!proxy)
+ goto error_create_proxy;
+ gst_vaapi_video_meta_set_surface_proxy (outbuf_meta, proxy);
+ gst_vaapi_surface_proxy_unref (proxy);
+ }
if (deint) {
deint_flags = (tff ? GST_VAAPI_DEINTERLACE_FLAG_TOPFIELD : 0);