diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-03-18 16:55:27 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-03-20 01:06:14 +0000 |
commit | fa3d457882e0b271b62b52bf5404a634c203469f (patch) | |
tree | f2c7fc8831480a9ac7732c9e12a9f2cbbab730b7 /gst/rtp | |
parent | f18dabdd571df302e7ef4ec88c5761d44b63126c (diff) |
rtpmp4adepay: don't append an extra 0 byte to the codec data
The audioMuxVersion structure is packed in such a way that the codec
data does not start byte-aligned, which means there's an extra bit of
padding at the end. We don't want that bit in the codec data, since
some decoders seem get confused when they're fed with an extra codec
data byte (also it's just not right of course).
Diffstat (limited to 'gst/rtp')
-rw-r--r-- | gst/rtp/gstrtpmp4adepay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gst/rtp/gstrtpmp4adepay.c b/gst/rtp/gstrtpmp4adepay.c index 406940e0..cb8735d0 100644 --- a/gst/rtp/gstrtpmp4adepay.c +++ b/gst/rtp/gstrtpmp4adepay.c @@ -208,9 +208,9 @@ gst_rtp_mp4a_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps) for (i = 0; i < size; i++) { data[i] = ((data[i + 1] & 1) << 7) | ((data[i + 2] & 0xfe) >> 1); } - /* last bit, this is probably not needed. */ - data[i] = ((data[i + 1] & 1) << 7); - GST_BUFFER_SIZE (buffer) = size + 1; + + /* ignore remaining bit, we're only interested in full bytes */ + GST_BUFFER_SIZE (buffer) = size; gst_caps_set_simple (srccaps, "codec_data", GST_TYPE_BUFFER, buffer, NULL); |