mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
vaapipostproc: do not override explicit srcpad colorimetry
If colorimetry has been set by a capsfilter (e.g. vaapipostproc ! video/x-raw,colorimetry=bt709) then don't try to override it. Previously, the aforementioned capsfilter will fail to negotiate if default colorimetry is not the same as the capsfilter (e.g. 4K resolutions).
This commit is contained in:
parent
c01f2e30d6
commit
654e824555
1 changed files with 5 additions and 1 deletions
|
@ -614,6 +614,10 @@ _set_colorimetry (GstVaapiPostproc * postproc, GstVideoFormat format,
|
||||||
gst_video_chroma_to_string (GST_VIDEO_INFO_CHROMA_SITE (&vinfo)), NULL);
|
gst_video_chroma_to_string (GST_VIDEO_INFO_CHROMA_SITE (&vinfo)), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if outs structure already specifies colorimetry, use it */
|
||||||
|
if (gst_structure_has_field (outs, "colorimetry"))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
/* make sure we set the RGB matrix for RGB formats */
|
/* make sure we set the RGB matrix for RGB formats */
|
||||||
colorimetry = GST_VIDEO_INFO_COLORIMETRY (&vinfo);
|
colorimetry = GST_VIDEO_INFO_COLORIMETRY (&vinfo);
|
||||||
if (GST_VIDEO_FORMAT_INFO_IS_RGB (vinfo.finfo) &&
|
if (GST_VIDEO_FORMAT_INFO_IS_RGB (vinfo.finfo) &&
|
||||||
|
@ -733,7 +737,7 @@ _get_preferred_caps (GstVaapiPostproc * postproc, GstVideoInfo * vinfo,
|
||||||
postproc->format = format;
|
postproc->format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
return outcaps;
|
return gst_caps_fixate (outcaps);
|
||||||
|
|
||||||
/* ERRORS */
|
/* ERRORS */
|
||||||
fixate_failed:
|
fixate_failed:
|
||||||
|
|
Loading…
Reference in a new issue