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 676799 - [gstrtpmp2tdepay] Don't push out stray data
[gstrtpmp2tdepay] Don't push out stray data
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.31
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 629506
Blocks:
 
 
Reported: 2012-05-25 08:53 UTC by Edward Hervey
Modified: 2012-05-26 10:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Edward Hervey 2012-05-25 08:53:48 UTC
+++ This bug was initially created as a clone of Bug #629506 +++

This file (once double-depayloaded to a mpeg-ts file) doesn't work in pull-mode with tsdemux:
http://dl.dropbox.com/u/11507187/out_kasenna.gdp
Comment 1 Edward Hervey 2012-05-26 09:57:00 UTC
After further analysis, the core problem is that the depayoaded file is not detected as mpegts.

The original RTP stream contains stray data in some UDP packets which we don't strip off in the RTP depayloader.

From RFC 2250

2. Encapsulation of MPEG System and Transport Streams
...
   For MPEG2 Transport Streams the RTP payload will contain an integral
   number of MPEG transport packets.  To avoid end system
   inefficiencies, data from multiple small MTS packets (normally fixed
   in size at 188 bytes) are aggregated into a single RTP packet.  The
   number of transport packets contained is computed by dividing RTP
   payload length by the length of an MTS packet (188).
....

Since it needs to contain "an integral number of MPEG transport packets", a simple fix is to check that's the case, and strip off any leftover data.
Comment 2 Edward Hervey 2012-05-26 10:00:45 UTC
commit 9f485d884cf2ecc1f336ecafacc52b332e072ffe
Author: Edward Hervey <edward.hervey@collabora.co.uk>
Date:   Sat May 26 11:57:16 2012 +0200

    rtpmp2tdepay: Only output integral mpeg-ts packets
    
    From RFC 2250
    
    2. Encapsulation of MPEG System and Transport Streams
    ...
       For MPEG2 Transport Streams the RTP payload will contain an integral
       number of MPEG transport packets.  To avoid end system
       inefficiencies, data from multiple small MTS packets (normally fixed
       in size at 188 bytes) are aggregated into a single RTP packet.  The
       number of transport packets contained is computed by dividing RTP
       payload length by the length of an MTS packet (188).
    ....
    
    Since it needs to contain "an integral number of MPEG transport packets", a
    simple fix is to check that's the case, and strip off any leftover data.
    
    Fixes #676799