mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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
This commit is contained in:
parent
14587eb8e8
commit
98c32df830
1 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue