mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
videoconvert: fix passthrough on equivalent transfer
When the input info and output info are equal, except for the transfer functions that are *not* equivalent, we need to set up a converter as we won't be passthrough. Fixes an assertion in that case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2929>
This commit is contained in:
parent
ffebd52e46
commit
31c1e586c3
1 changed files with 5 additions and 6 deletions
|
@ -792,12 +792,11 @@ gst_video_convert_scale_set_info (GstVideoFilter * filter, GstCaps * in,
|
|||
* we're converting between equivalent transfer functions, do passthrough */
|
||||
tmp_info = *in_info;
|
||||
tmp_info.colorimetry.transfer = out_info->colorimetry.transfer;
|
||||
if (gst_video_info_is_equal (&tmp_info, out_info)) {
|
||||
if (gst_video_transfer_function_is_equivalent (in_info->colorimetry.
|
||||
transfer, in_info->finfo->bits, out_info->colorimetry.transfer,
|
||||
out_info->finfo->bits)) {
|
||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
}
|
||||
if (gst_video_info_is_equal (&tmp_info, out_info) &&
|
||||
gst_video_transfer_function_is_equivalent (in_info->colorimetry.transfer,
|
||||
in_info->finfo->bits, out_info->colorimetry.transfer,
|
||||
out_info->finfo->bits)) {
|
||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
} else {
|
||||
GstStructure *options;
|
||||
GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, filter, "setup videoscaling");
|
||||
|
|
Loading…
Reference in a new issue