rtphdrext: Give "inherited" direction in set_attributes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/906>
This commit is contained in:
Olivier Crête 2021-09-27 16:11:33 -04:00 committed by GStreamer Marge Bot
parent 6cd483d17a
commit 7abd83dfea
2 changed files with 8 additions and 0 deletions

View file

@ -511,6 +511,13 @@ gst_rtp_header_extension_set_attributes_from_caps (GstRTPHeaderExtension * ext,
goto done; 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) if (klass->set_attributes)
ret = klass->set_attributes (ext, direction, attributes); ret = klass->set_attributes (ext, direction, attributes);
else else

View file

@ -176,6 +176,7 @@ struct _GstRTPHeaderExtension
* *
* Since: 1.20 * Since: 1.20
*/ */
struct _GstRTPHeaderExtensionClass struct _GstRTPHeaderExtensionClass
{ {
GstElementClass parent_class; GstElementClass parent_class;