summaryrefslogtreecommitdiff
path: root/gst/mpegpsmux
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-09-22 20:11:21 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-09-22 20:11:21 +0100
commitad1883f54d100e0bb2d6aa6ec3463accc6cc26cc (patch)
tree7d4c1682ac8dc926f8b721662ff8f7cfb4cfb828 /gst/mpegpsmux
parent76dccf91fd5bdbb48e7b066c57b50a2416c78ecc (diff)
downloadgstreamer-plugins-bad-ad1883f54d100e0bb2d6aa6ec3463accc6cc26cc.tar.gz
psmux: fix writing of system header, which makes VLC not skip the adjacent PSM and play embedded H.264 streams
header_length contains the length in bytes after the header_length field, excluding the 6 byte start code and header_length field. H.264 streams and some other formats need to be announced in the PSM. VLC wouldn't play files created with mpegpsmux containing H.264 because we claim the system header is larger than it actually is, which makes VLC skip the program stream map which follows the system header, which in turn makes it not recognise our H.264 video stream.
Diffstat (limited to 'gst/mpegpsmux')
-rw-r--r--gst/mpegpsmux/psmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/mpegpsmux/psmux.c b/gst/mpegpsmux/psmux.c
index 9d0493c1d..0a714d038 100644
--- a/gst/mpegpsmux/psmux.c
+++ b/gst/mpegpsmux/psmux.c
@@ -348,7 +348,7 @@ psmux_write_system_header (PsMux * mux)
bits_write (&bw, 24, PSMUX_START_CODE_PREFIX);
bits_write (&bw, 8, PSMUX_SYSTEM_HEADER);
- bits_write (&bw, 16, len); /* header_length */
+ bits_write (&bw, 16, len - 6); /* header_length (bytes after this field) */
bits_write (&bw, 1, 1); /* marker */
bits_write (&bw, 22, mux->rate_bound); /* rate_bound */
bits_write (&bw, 1, 1); /* marker */