avtpvfpaybase: Don't require a caps handling method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9412>
This commit is contained in:
parent
33d0170d6e
commit
cf039e49e8
@ -323,24 +323,26 @@ static gboolean
|
|||||||
gst_avtp_vf_pay_base_sink_event (GstPad * pad, GstObject * parent,
|
gst_avtp_vf_pay_base_sink_event (GstPad * pad, GstObject * parent,
|
||||||
GstEvent * event)
|
GstEvent * event)
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
|
||||||
GstAvtpBasePayload *avtpbasepayload = GST_AVTP_BASE_PAYLOAD (parent);
|
GstAvtpBasePayload *avtpbasepayload = GST_AVTP_BASE_PAYLOAD (parent);
|
||||||
GstAvtpVfPayBase *avtpvfpaybase = GST_AVTP_VF_PAY_BASE (avtpbasepayload);
|
GstAvtpVfPayBase *avtpvfpaybase = GST_AVTP_VF_PAY_BASE (avtpbasepayload);
|
||||||
gboolean ret;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (avtpvfpaybase, "Sink event %s",
|
GST_DEBUG_OBJECT (avtpvfpaybase, "Sink event %s",
|
||||||
GST_EVENT_TYPE_NAME (event));
|
GST_EVENT_TYPE_NAME (event));
|
||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_CAPS:
|
case GST_EVENT_CAPS:
|
||||||
gst_event_parse_caps (event, &caps);
|
if (GST_AVTP_VF_PAY_BASE_GET_CLASS (avtpvfpaybase)->new_caps) {
|
||||||
g_assert (GST_AVTP_VF_PAY_BASE_GET_CLASS (avtpvfpaybase)->new_caps !=
|
GstCaps *caps;
|
||||||
NULL);
|
gboolean ret;
|
||||||
ret =
|
|
||||||
GST_AVTP_VF_PAY_BASE_GET_CLASS (avtpvfpaybase)->new_caps
|
gst_event_parse_caps (event, &caps);
|
||||||
(avtpvfpaybase, caps);
|
ret =
|
||||||
gst_event_unref (event);
|
GST_AVTP_VF_PAY_BASE_GET_CLASS (avtpvfpaybase)->new_caps
|
||||||
return ret;
|
(avtpvfpaybase, caps);
|
||||||
|
gst_event_unref (event);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case GST_EVENT_FLUSH_STOP:
|
case GST_EVENT_FLUSH_STOP:
|
||||||
if (GST_ELEMENT (avtpvfpaybase)->current_state == GST_STATE_PLAYING) {
|
if (GST_ELEMENT (avtpvfpaybase)->current_state == GST_STATE_PLAYING) {
|
||||||
/* After a flush, the sink will reset pipeline base_time, but only
|
/* After a flush, the sink will reset pipeline base_time, but only
|
||||||
|
Loading…
x
Reference in New Issue
Block a user