diff options
author | Hyunjun Ko <zzoon@igalia.com> | 2017-02-01 14:32:45 +0900 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2017-02-01 16:05:13 +0100 |
commit | 7f69f679b12a042d09fe22845cca5a26ae800856 (patch) | |
tree | 24112c702f9762305f5d85e3829714ae0cb56976 | |
parent | cb74d44c2e5b9508145fa13b1a3e3284a069f38b (diff) |
vaapipostproc: set GST_VAAPI_POSTPROC_FLAG_SIZE according to src caps
A value of width/height property should be set to out caps,
if negotiation had been going properly.
So we can use srcpad_info when making decision of scaling.
https://bugzilla.gnome.org/show_bug.cgi?id=778010
-rw-r--r-- | gst/vaapi/gstvaapipostproc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index fb469ac4..1bae9e9f 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -981,10 +981,12 @@ gst_vaapipostproc_update_src_caps (GstVaapiPostproc * postproc, GstCaps * caps, postproc->format != DEFAULT_FORMAT) postproc->flags |= GST_VAAPI_POSTPROC_FLAG_FORMAT; - if ((postproc->width || postproc->height) && - postproc->width != GST_VIDEO_INFO_WIDTH (&postproc->sinkpad_info) && - postproc->height != GST_VIDEO_INFO_HEIGHT (&postproc->sinkpad_info)) + if (GST_VIDEO_INFO_WIDTH (&postproc->srcpad_info) != + GST_VIDEO_INFO_WIDTH (&postproc->sinkpad_info) + && GST_VIDEO_INFO_HEIGHT (&postproc->srcpad_info) != + GST_VIDEO_INFO_HEIGHT (&postproc->sinkpad_info)) postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SIZE; + return TRUE; } |