mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
rtphdrext-rfc6464: Put max level if the audio is beyond it
Otherwise, it just fails to add the extension, which makes no sense. And our level element produces levels higher than 127 in some cases. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1058>
This commit is contained in:
parent
23d07f3c7b
commit
f70ccd6d86
1 changed files with 5 additions and 3 deletions
|
@ -219,6 +219,7 @@ gst_rtp_header_extension_rfc6464_write (GstRTPHeaderExtension * ext,
|
|||
GstBuffer * output, guint8 * data, gsize size)
|
||||
{
|
||||
GstAudioLevelMeta *meta;
|
||||
guint level;
|
||||
|
||||
g_return_val_if_fail (size >=
|
||||
gst_rtp_header_extension_rfc6464_get_max_size (ext, NULL), -1);
|
||||
|
@ -231,10 +232,11 @@ gst_rtp_header_extension_rfc6464_write (GstRTPHeaderExtension * ext,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (meta->level > 127) {
|
||||
GST_WARNING_OBJECT (ext, "level from meta is higher than 127: %d",
|
||||
level = meta->level;
|
||||
if (level > 127) {
|
||||
GST_LOG_OBJECT (ext, "level from meta is higher than 127: %d, cropping",
|
||||
meta->level);
|
||||
return -1;
|
||||
level = 127;
|
||||
}
|
||||
|
||||
GST_LOG_OBJECT (ext, "writing ext (level: %d voice: %d)", meta->level,
|
||||
|
|
Loading…
Reference in a new issue