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;