From 3d2048e40ac7ecb49944eee21bc9d109f0b9ea0a Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Fri, 26 Aug 2016 02:20:11 +1000 Subject: [PATCH] videoaggregator: Handle if update_caps() returns EMPTY Don't assume the returned caps from update_caps() is non-empty. --- gst-libs/gst/video/gstvideoaggregator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/gstvideoaggregator.c b/gst-libs/gst/video/gstvideoaggregator.c index 1d40854d15..cd42d7ed2c 100644 --- a/gst-libs/gst/video/gstvideoaggregator.c +++ b/gst-libs/gst/video/gstvideoaggregator.c @@ -737,7 +737,8 @@ gst_video_aggregator_update_src_caps (GstVideoAggregator * vagg) GST_DEBUG_OBJECT (vagg, "updating caps from %" GST_PTR_FORMAT, downstream_caps); GST_DEBUG_OBJECT (vagg, " with filter %" GST_PTR_FORMAT, peercaps); - if (!(caps = vagg_klass->update_caps (vagg, downstream_caps, peercaps))) { + if (!(caps = vagg_klass->update_caps (vagg, downstream_caps, peercaps)) || + gst_caps_is_empty (caps)) { GST_WARNING_OBJECT (vagg, "Subclass failed to update provided caps"); gst_caps_unref (downstream_caps); if (peercaps)