Commit 9b6dcc7f authored by Jochen Henneberg's avatar Jochen Henneberg Committed by Sebastian Dröge

rtpgstdepay: Update pad caps if inline caps change

If the inlined caps change while using the same CV we need to update the
source pad caps.
parent 34233baa
......@@ -116,12 +116,19 @@ gst_rtp_gst_depay_finalize (GObject * object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
static gboolean
store_cache (GstRtpGSTDepay * rtpgstdepay, guint CV, GstCaps * caps)
{
gboolean changed = FALSE;
if (caps && rtpgstdepay->CV_cache[CV])
changed = !gst_caps_is_strictly_equal (caps, rtpgstdepay->CV_cache[CV]);
if (rtpgstdepay->CV_cache[CV])
gst_caps_unref (rtpgstdepay->CV_cache[CV]);
rtpgstdepay->CV_cache[CV] = caps;
return changed;
}
static void
......@@ -464,7 +471,8 @@ gst_rtp_gst_depay_process (GstRTPBaseDepayload * depayload, GstRTPBuffer * rtp)
GST_DEBUG_OBJECT (rtpgstdepay,
"inline caps %u, length %u, %" GST_PTR_FORMAT, CV, size, outcaps);
store_cache (rtpgstdepay, CV, outcaps);
if (store_cache (rtpgstdepay, CV, outcaps))
gst_pad_set_caps (depayload->srcpad, outcaps);
/* skip caps */
offset += size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment