From 92fcb38ba67e5f91577b5d0b7392767b61df84a4 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Fri, 22 Aug 2014 15:17:29 +0200 Subject: [PATCH] vaapipostproc: fix passthrough mode. If no explicit output surface format is supplied try to keep the one supplied through the sink pad caps. This avoids a useless copy, even if things are kept in GPU memory. This is a performance regression from git commit dfa70b9. --- gst/vaapi/gstvaapipostproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index ecd7a03577..ce2413122e 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -873,7 +873,7 @@ gst_vaapipostproc_update_src_caps(GstVaapiPostproc *postproc, GstCaps *caps, if (video_info_changed(&vi, &postproc->srcpad_info)) postproc->srcpad_info = vi, *caps_changed_ptr = TRUE; - if (postproc->format != GST_VIDEO_INFO_FORMAT(&postproc->sinkpad_info) || + if (postproc->format != GST_VIDEO_INFO_FORMAT(&postproc->sinkpad_info) && postproc->format != DEFAULT_FORMAT) postproc->flags |= GST_VAAPI_POSTPROC_FLAG_FORMAT;