gltestsrc: Run context query only during decide_allocation
authorPhilippe Normand <philn@igalia.com>
Wed, 28 Nov 2018 11:13:39 +0000 (11:13 +0000)
committerMatthew Waters <matthew@centricular.com>
Fri, 30 Nov 2018 01:55:34 +0000 (01:55 +0000)
commitd5f2b5dcfa98c5c79e8045b8d249f48b3a82bfb9
tree2dfaa15a781e35a0ea7fadcd6a6ce9345cb883ad
parent179409e9b3f5ed35b9fb7120de129de8dbe3a436
gltestsrc: Run context query only during decide_allocation

Running the context query in _start and during the NULL->READY state transition
can fail because downstream elements might not be able to answer and thus the
source element would not be able to reuse downstream GLContext and GLDisplay.

This issue happened specifically when trying to use gltestsrc in playbin.
ext/gl/gstgltestsrc.c