video-converter: Guard against invalid frame input
authorJan Schmidt <jan@centricular.com>
Fri, 5 Jun 2020 13:34:44 +0000 (23:34 +1000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 12 Jun 2020 06:49:56 +0000 (06:49 +0000)
commitbf5d51c5da78b84c203d61369b640de0042dd0bf
tree1900f5566c376c1fca5506764bede67405daa511
parentb4bdb75a800fb615ca20739ae8444b9b094a2b26
video-converter: Guard against invalid frame input

If the frames passed in to gst_video_converter_frame()
have a different layout than was configured for, the
conversion code might go out of bounds and crash.

Do a sanity check on each frame passed in, and in the
absence of a return value in the API, just
refuse the conversion in invalid cases and leave the
destination frame untouched so it's obvious to
users that it was broken.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/696>
gst-libs/gst/video/video-converter.c
tests/check/libs/video.c