kmssink: Crop Meta support only works if the proposed pool has been used
@ndufresne
Submitted by Nicolas Dufresne Link to original bug (#791450)
Description
++ This is the same as https://bugzilla.gnome.org/show_bug.cgi?id=791449
Whenever the proposed pool is not used upstream, the element fails. The reason is that buffer containing crop meta are larger then caps width/height used to create the internal pool.
We need to delay the creation of the pool, and then alter the caps width/height with the width/height found in the incoming buffer video meta. As a side effect, we also need to validate this width/height every-time.
I'll post the videocrop patches needed to test this easily soon, meanwhile the test pipeline will be:
videotestsrc ! videocrop top=100 ! tee ! kmsimagesink
Tee does not drop the allocation query, but will not use downstream pools.
The result is a black or green image (depends on the color format) and:
CRITICAL **: gst_video_frame_copy: assertion 'dinfo->width == sinfo->width && dinfo->height == sinfo->height' failed