gstreamer/subprojects/gst-plugins-base/gst/videoconvertscale
Matthew Waters dd4bbb6379 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().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2709>
2022-07-04 19:57:10 +00:00
..
gstvideoconvert.c videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale 2022-04-20 17:09:20 -04:00
gstvideoconvert.h Introduce the videocolorscale element 2022-04-20 17:03:21 -04:00
gstvideoconvertscale.c videoconvertscale: ensure writable caps when fixating format 2022-07-04 19:57:10 +00:00
gstvideoconvertscale.h videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale 2022-04-20 17:09:20 -04:00
gstvideoconvertscaleplugin.c Introduce the videocolorscale element 2022-04-20 17:03:21 -04:00
gstvideoscale.c videoconvertscale: Add properties to disable scaling/converting in videoconvert/videoscale 2022-04-20 17:09:20 -04:00
gstvideoscale.h Introduce the videocolorscale element 2022-04-20 17:03:21 -04:00
meson.build Introduce the videocolorscale element 2022-04-20 17:03:21 -04:00
README Introduce the videocolorscale element 2022-04-20 17:03:21 -04:00

- test different strides using
gst-launch -v videotestsrc ! video/x-raw,width=320,height=240,format=UYVY ! videoconvertscale ! video/x-raw,width=328,height=240 ! xvimagesink
gst-launch -v videotestsrc ! video/x-raw,width=320,height=240,format=UYVY ! videoconvertscale ! video/x-raw,width=324,height=240 ! xvimagesink
gst-launch -v videotestsrc ! video/x-raw,width=320,height=240,format=UYVY ! videoconvertscale ! video/x-raw,width=322,height=240 ! xvimagesink
gst-launch -v videotestsrc ! video/x-raw,width=320,height=240,format=UYVY ! videoconvertscale ! video/x-raw,width=321,height=240 ! xvimagesink