Skip to content

videoconvertscale: ensure writable caps when fixating format

gst_video_convert_scale_get_fixed_format() receives 'othercaps' from basetransforms' fixate_caps() vmethod which explicitly mentions that 'othercaps may not be writable'.

The gst_caps_intersect() call just before may or may not produce new caps. Particularly in cases like EMPTY or ANY caps on either of the inputs, only a ref is taken and returned to the caller.

As a result, gst_video_convert_scale_fixate_format() may have attempted to modify a non-writable caps structure.

Fix by adding a gst_caps_make_writable().

Merge request reports