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.
This commit is contained in:
Gwenole Beauchesne 2014-08-22 15:17:29 +02:00
parent db111fe72a
commit 92fcb38ba6

View file

@ -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;