After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 623209 - bug in rtpL16depay
bug in rtpL16depay
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.23
Other Linux
: Normal major
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-06-30 13:01 UTC by nospam12
Modified: 2010-08-04 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.18 KB, patch)
2010-07-06 16:36 UTC, Wim Taymans
none Details | Review

Description nospam12 2010-06-30 13:01:21 UTC
Hello. I came across this bug while trying to stream raw audio over rtsp (using rtpL16pay).

Wim Taymans identified the source of the problem to be the depayloader not using encoding-params for the number of channels.

I confirm that his suggested patch (below) works. Possibly unrelated, the playback on the raw audio is choppy...the stream is over loopback. Any ideas on the source of the choppiness?

============

diff --git a/gst/rtp/gstrtpL16depay.c b/gst/rtp/gstrtpL16depay.c
index 619f3ef..590df42 100644
--- a/gst/rtp/gstrtpL16depay.c
+++ b/gst/rtp/gstrtpL16depay.c
@@ -168,9 +168,13 @@ gst_rtp_L16_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
   if (clock_rate == 0)
     goto no_clockrate;
 
-  channels = gst_rtp_L16_depay_parse_int (structure, "channels", channels);
-  if (channels == 0)
-    goto no_channels;
+  channels = gst_rtp_L16_depay_parse_int (structure, "encoding-params", channels);
+  if (channels == 0) {
+    channels = gst_rtp_L16_depay_parse_int (structure, "channels", channels);
+    if (channels == 0) {
+      goto no_channels;
+    }
+  }
 
   depayload->clock_rate = clock_rate;
   rtpL16depay->rate = clock_rate;
Comment 1 nospam12 2010-06-30 18:03:51 UTC
I forgot to paste the actual error along with this report. Basically when streaming audio/x-raw-int (16) over rtsp, the client side hangs with this debug info:

GST_CAPS gstpad.c:2651:gst_pad_set_caps:<recv_rtp_src_1_1880364752_97:proxypad8> caps application/x-rtp, media=(string)audio, payload=(int)97, clock-rate=(int)44100, encoding-name=(string)L16, encoding-params=(string)2, a-tool=(string)GStreamer, a-type=(string)broadcast, clock-base=(uint)1492480425, seqnum-base=(uint)43707, npt-start=(guint64)0, npt-stop=(guint64)37910999298, play-speed=(double)1, play-scale=(double)1 could not be set
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2: Internal data flow error.
Additional debug info:
gstbasesrc.c(2543): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc2:
streaming task paused, reason not-negotiated (-4)
Comment 2 Wim Taymans 2010-07-06 16:36:01 UTC
Created attachment 165372 [details] [review]
proposed patch

proposed patch
Comment 3 Olivier Crête 2010-07-06 16:46:24 UTC
You shouldn't fail if the channel count is not specified. It defaults to 1 according to RFC 3555 section 4.1.15.
Comment 4 Wim Taymans 2010-07-06 16:58:28 UTC
(In reply to comment #3)
> You shouldn't fail if the channel count is not specified. It defaults to 1
> according to RFC 3555 section 4.1.15.

good point. I'll make the default channels for dynamic L16 types to 1 (instead of 0) then.
Comment 5 Wim Taymans 2010-08-04 09:13:43 UTC
commit ed80c1834cbf80d26a47a75e7f40f777dd615dda
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Mon Jul 5 10:23:37 2010 +0200

    L16depay: use encoding-params for the channels
    
    When parsing the number of channels, use the encoding-params property from the
    RTP caps because that is where we can find the channels according to the spec.
    Fall back to the channels property in the caps when needed.
    
    Fixes #623209