From 7abd83dfea537eced2bdbd983219806193d1e34b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 27 Sep 2021 16:11:33 -0400 Subject: [PATCH] rtphdrext: Give "inherited" direction in set_attributes Part-of: --- .../gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c | 7 +++++++ .../gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.h | 1 + 2 files changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c index 871d532a1b..3f7fb25d05 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.c @@ -511,6 +511,13 @@ gst_rtp_header_extension_set_attributes_from_caps (GstRTPHeaderExtension * ext, goto done; } + /* If the caps don't include directions, use the ones that were + * previously set by the application. + */ + if (direction == GST_RTP_HEADER_EXTENSION_DIRECTION_DEFAULT && + priv->direction & GST_RTP_HEADER_EXTENSION_DIRECTION_INHERITED) + direction = priv->direction; + if (klass->set_attributes) ret = klass->set_attributes (ext, direction, attributes); else diff --git a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.h b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.h index be2a67eed5..dcd6d8ef81 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/rtp/gstrtphdrext.h @@ -176,6 +176,7 @@ struct _GstRTPHeaderExtension * * Since: 1.20 */ + struct _GstRTPHeaderExtensionClass { GstElementClass parent_class;