From eb10995895bdcafa9ad337370b1da5cd1df3b853 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 11 Apr 2011 15:02:38 +0200 Subject: [PATCH] videorate: empty caps have no structure to pick --- gst/videorate/gstvideorate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 2797d8ab47..4f53c81388 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -340,6 +340,12 @@ gst_video_rate_setcaps (GstPad * pad, GstCaps * caps) GST_DEBUG_OBJECT (videorate, "intersect %" GST_PTR_FORMAT, caps); + /* could turn up empty, due to e.g. colorspace etc */ + if (gst_caps_get_size (caps) == 0) { + gst_caps_unref (caps); + goto no_transform; + } + /* take first possibility */ gst_caps_truncate (caps); structure = gst_caps_get_structure (caps, 0);