mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 13:02:29 +00:00
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:
parent
c9bd45f05d
commit
a01c0bc352
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue