qmlsink: support caps changes better
authorMatthew Waters <matthew@centricular.com>
Thu, 11 Nov 2021 04:49:19 +0000 (15:49 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 12 Nov 2021 07:17:17 +0000 (07:17 +0000)
commitd2fd5f1534bba5e28934c8a2161e02f8bbdf73e8
treeb320da189cdd6927503d4dee6d34d10a2de34f13
parent1e27ea63afbee24e47301f9212d2ec1ddf254c41
qmlsink: support caps changes better

We need to hold onto the last buffer until the next buffer arrives.
Before, if a caps change comes we would remove the currently rendering
buffer.  if Qt asks use to render something, we would render the dummy
black texture.

Fixes a period of black output when upstream is e.g. changing resolution
as in hls adaptive bitrate scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1338>
subprojects/gst-plugins-good/ext/qt/qtitem.cc