mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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).
This commit is contained in:
parent
f18dabdd57
commit
fa3d457882
1 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue