mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
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.
This commit is contained in:
parent
34233baae1
commit
9b6dcc7f1b
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue