rtpmp2tdepay: Only output integral mpeg-ts packets
authorEdward Hervey <edward.hervey@collabora.co.uk>
Sat, 26 May 2012 09:57:16 +0000 (11:57 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Sat, 26 May 2012 10:04:54 +0000 (12:04 +0200)
commit923be8a85b1cae4e509e2cc095e90780cf095578
tree29f9e404dddb79fd5196479d4bf6b4357d85dab6
parent5b3d3b0885eee6dc6e10e0fc39ac1c85c7b73e2d
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

Conflicts:

gst/rtp/gstrtpmp2tdepay.c
gst/rtp/gstrtpmp2tdepay.c