videoscale: Fix the src video info error in transfer_colorimetry_from_input()
authorHe Junyan <junyan.he@intel.com>
Sun, 24 Apr 2022 15:19:00 +0000 (23:19 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 26 Apr 2022 14:17:50 +0000 (14:17 +0000)
commitf55b36e6aaca6be051a3b02f54ed24714121f00e
tree22cf8756fa4cb5082dcaf476e523f47b52b8b611
parentc0d7d5c2c8d2934004d99eaf2c67b90cde349663
videoscale: Fix the src video info error in transfer_colorimetry_from_input()

Pipeline such as:
gst-launch-1.0 -vf videotestsrc ! video/x-raw,format=NV12,colorimetry=\(string\)bt709 \
 ! videoscale ! video/x-raw,format=I420 ! fakesink
Always trigger a error:
ERROR             video-info video-info.c:556:gst_video_info_from_caps: no width property given

Because it is called before the fixate_size(), the src caps' resolution
may be absent or not fixed. That causes that the src video info can not
be created correctly and we can not inherit the colorimetry and chroma-site
from the input caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2289>
subprojects/gst-plugins-base/gst/videoconvertscale/gstvideoconvertscale.c