mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
mp4, fmp4: fix byte order for opus extension
The "Encapsulation of Opus in ISO Base Media File Format" [1] specifications, § 4.3.2 Opus Specific Box, indicates that data must be stored as big-endian. In `write_dops`, `to_le_bytes` variants were used. Related to [2]. [1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2 [2] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4875 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1247>
This commit is contained in:
parent
84a33ca7b9
commit
f85106b86a
2 changed files with 6 additions and 6 deletions
|
@ -1502,9 +1502,9 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
|
||||||
// Version number
|
// Version number
|
||||||
v.push(0);
|
v.push(0);
|
||||||
v.push(channels);
|
v.push(channels);
|
||||||
v.extend(pre_skip.to_le_bytes());
|
v.extend(pre_skip.to_be_bytes());
|
||||||
v.extend(rate.to_le_bytes());
|
v.extend(rate.to_be_bytes());
|
||||||
v.extend(output_gain.to_le_bytes());
|
v.extend(output_gain.to_be_bytes());
|
||||||
v.push(channel_mapping_family);
|
v.push(channel_mapping_family);
|
||||||
if channel_mapping_family > 0 {
|
if channel_mapping_family > 0 {
|
||||||
v.push(stream_count);
|
v.push(stream_count);
|
||||||
|
|
|
@ -1319,9 +1319,9 @@ fn write_dops(v: &mut Vec<u8>, caps: &gst::Caps) -> Result<(), Error> {
|
||||||
// Version number
|
// Version number
|
||||||
v.push(0);
|
v.push(0);
|
||||||
v.push(channels);
|
v.push(channels);
|
||||||
v.extend(pre_skip.to_le_bytes());
|
v.extend(pre_skip.to_be_bytes());
|
||||||
v.extend(rate.to_le_bytes());
|
v.extend(rate.to_be_bytes());
|
||||||
v.extend(output_gain.to_le_bytes());
|
v.extend(output_gain.to_be_bytes());
|
||||||
v.push(channel_mapping_family);
|
v.push(channel_mapping_family);
|
||||||
if channel_mapping_family > 0 {
|
if channel_mapping_family > 0 {
|
||||||
v.push(stream_count);
|
v.push(stream_count);
|
||||||
|
|
Loading…
Reference in a new issue