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 627204 - Some audio-based depayloaders are sometimes incorrectly indicating discont flag and RTP-marker bit.
Some audio-based depayloaders are sometimes incorrectly indicating discont fl...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.24
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-08-17 19:29 UTC by American Dynamics
Modified: 2013-04-24 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
726depay.c patch (2.36 KB, patch)
2010-08-17 19:30 UTC, American Dynamics
none Details | Review
726depay.h patch (258 bytes, patch)
2010-08-17 19:31 UTC, American Dynamics
none Details | Review
711alaw.c patch (2.11 KB, patch)
2010-08-17 19:32 UTC, American Dynamics
none Details | Review
711 alaw.h patch (261 bytes, patch)
2010-08-17 19:33 UTC, American Dynamics
none Details | Review
711 ulaw.c patch (2.11 KB, patch)
2010-08-17 19:33 UTC, American Dynamics
none Details | Review
711 ulaw.h patch (261 bytes, patch)
2010-08-17 19:34 UTC, American Dynamics
none Details | Review

Description American Dynamics 2010-08-17 19:29:23 UTC
We have noted in some models of Axis IP cameras (Axis 223M in particular), the audio-based depayloaders (726, 711 u/a) are incorrectly setting the DISCONT flag and also invalidly determining a "talkspurt" (marker bit is always set).  We modified the code to use RTP timestamp calculation to determine discontinuity.
Comment 1 American Dynamics 2010-08-17 19:30:42 UTC
Created attachment 168123 [details] [review]
726depay.c patch
Comment 2 American Dynamics 2010-08-17 19:31:11 UTC
Created attachment 168124 [details] [review]
726depay.h patch
Comment 3 American Dynamics 2010-08-17 19:32:46 UTC
Created attachment 168125 [details] [review]
711alaw.c patch
Comment 4 American Dynamics 2010-08-17 19:33:05 UTC
Created attachment 168126 [details] [review]
711 alaw.h patch
Comment 5 American Dynamics 2010-08-17 19:33:40 UTC
Created attachment 168127 [details] [review]
711 ulaw.c patch
Comment 6 American Dynamics 2010-08-17 19:34:34 UTC
Created attachment 168128 [details] [review]
711 ulaw.h patch
Comment 7 Olivier Crête 2010-08-17 19:56:41 UTC
Review of attachment 168125 [details] [review]:

::: gstrtppcmadepay.c
@@ +145,3 @@
+    gboolean marker, guint32 timestamp)
+{
+  return (marker && timestamp != depayload->predicted_rtp_ts) ? TRUE : FALSE;

"? TRUE : FALSE" is entirely redundant here

@@ +175,3 @@
 
+  if (!GST_BUFFER_IS_DISCONT (buf) &&
+      gst_rtp_pcma_depay_is_talkspurt (depay, marker, timestamp)) {

Do you really mean to never set the discont flag on the output if it was set on the input buffer ? Shouldn't it be "GST_BUFFER_IS_DISCONT (buf) && .." ? Or am I lost ?
Comment 8 Wim Taymans 2010-08-18 10:25:28 UTC
Is this because the camera is always setting the marker bit, even when there is not really any talk spurt?
Comment 9 American Dynamics 2010-08-19 19:38:30 UTC
(In reply to comment #8)
> Is this because the camera is always setting the marker bit, even when there is
> not really any talk spurt?

Yes, that is the problem, so we added an additional check that the timestamps actually reflect a gap before indicating discont.
Comment 10 Wim Taymans 2010-09-17 16:25:19 UTC
I don't see how this can work. The base class remembers the DISCONT flag on the input buffer and marks DISCONT on the next output buffer, there is nothing a subclass can do about that.
Comment 11 Sebastian Dröge (slomo) 2011-05-09 10:01:05 UTC
How should we go ahead with this bug?
Comment 12 Wim Taymans 2013-04-24 13:45:27 UTC
I believe this is the way to go in 1.0, don't set the DISCONT flag but use the RESYNC flag:

commit eac9efb92e22fcfa41e915e3db0b6d95e397a222
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Apr 24 15:38:50 2013 +0200

    rtp: a marker bit should translate to RESYNC
    
    A marker bit on an audio packet does not mean a DISCONT (in the GStreamer sense
    of missing data) but it means that the packet is the end of a talkspurt and thus
    a good opportunity to resync to the clock. Use the RESYNC buffer flag to note
    this.
    Real discontinuities are marked with DISCONT still when the seqnum has a GAP or
    when the input buffer has the DISCONT flag set.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=627204