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
This commit is contained in:
Hyunjun Ko 2017-02-01 14:32:45 +09:00 committed by Víctor Manuel Jáquez Leal
parent c9bd45f05d
commit a01c0bc352

View file

@ -982,10 +982,12 @@ gst_vaapipostproc_update_src_caps (GstVaapiPostproc * postproc, GstCaps * caps,
postproc->format != DEFAULT_FORMAT) postproc->format != DEFAULT_FORMAT)
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_FORMAT; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_FORMAT;
if ((postproc->width || postproc->height) && if (GST_VIDEO_INFO_WIDTH (&postproc->srcpad_info) !=
postproc->width != GST_VIDEO_INFO_WIDTH (&postproc->sinkpad_info) && GST_VIDEO_INFO_WIDTH (&postproc->sinkpad_info)
postproc->height != GST_VIDEO_INFO_HEIGHT (&postproc->sinkpad_info)) && GST_VIDEO_INFO_HEIGHT (&postproc->srcpad_info) !=
GST_VIDEO_INFO_HEIGHT (&postproc->sinkpad_info))
postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SIZE; postproc->flags |= GST_VAAPI_POSTPROC_FLAG_SIZE;
return TRUE; return TRUE;
} }