diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2017-01-20 19:57:52 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-01-23 19:48:14 +0100 |
commit | a9330dcb8094acce440fc4918688fa51afc663a1 (patch) | |
tree | 094258b4b75e12b1f92e922780c14fc0606151e5 | |
parent | 653bab8f1d69c4ef646ee0d1d27e0ffe70c5521e (diff) |
vaapipostproc: use sink caps par if not requested
Use the sink caps pixel-aspect-ratio to fixate the src caps, if it
is not already set.
https://bugzilla.gnome.org/show_bug.cgi?id=777395
-rw-r--r-- | gst/vaapi/gstvaapipostprocutil.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/vaapi/gstvaapipostprocutil.c b/gst/vaapi/gstvaapipostprocutil.c index d1bdd889..1780df3f 100644 --- a/gst/vaapi/gstvaapipostprocutil.c +++ b/gst/vaapi/gstvaapipostprocutil.c @@ -160,11 +160,11 @@ _fixate_frame_size (GstVaapiPostproc * postproc, GstVideoInfo * vinfo, to_par = gst_structure_get_value (outs, "pixel-aspect-ratio"); if (!to_par) { g_value_init (&tpar, GST_TYPE_FRACTION); - gst_value_set_fraction (&tpar, 1, 1); + gst_value_set_fraction (&tpar, GST_VIDEO_INFO_PAR_N (vinfo), + GST_VIDEO_INFO_PAR_D (vinfo)); to_par = &tpar; - gst_structure_set (outs, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, - NULL); + gst_structure_set_value (outs, "pixel-aspect-ratio", &tpar); } /* we have both PAR but they might not be fixated */ |