mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
gst/mpegaudioparse/gstxingmux.c: Correctly write the size in bytes on big endian systems.
Original commit message from CVS: * gst/mpegaudioparse/gstxingmux.c: (generate_xing_header): Correctly write the size in bytes on big endian systems. Fixes bug #515725.
This commit is contained in:
parent
cfcd418583
commit
17a6a7417c
2 changed files with 19 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-02-11 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* gst/mpegaudioparse/gstxingmux.c: (generate_xing_header):
|
||||||
|
Correctly write the size in bytes on big endian systems.
|
||||||
|
Fixes bug #515725.
|
||||||
|
|
||||||
2008-02-11 Sebastian Dröge <slomo@circular-chaos.org>
|
2008-02-11 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
* ext/lame/gstlame.c: (gst_lame_setup):
|
* ext/lame/gstlame.c: (gst_lame_setup):
|
||||||
|
|
|
@ -330,12 +330,19 @@ generate_xing_header (GstXingMux * xing)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (byte_count != 0) {
|
if (byte_count != 0) {
|
||||||
GST_DEBUG ("Setting number of bytes to %u", byte_count);
|
guint32 nbytes;
|
||||||
byte_count = GUINT32_TO_BE (byte_count);
|
|
||||||
memcpy (data, &byte_count, 4);
|
if (byte_count > G_MAXUINT32) {
|
||||||
|
GST_DEBUG ("Too large stream: %" G_GINT64_FORMAT " > %" G_GINT64_FORMAT
|
||||||
|
" bytes", byte_count, G_MAXUINT32);
|
||||||
|
} else {
|
||||||
|
nbytes = byte_count;
|
||||||
|
GST_DEBUG ("Setting number of bytes to %u", nbytes);
|
||||||
|
nbytes = GUINT32_TO_BE (nbytes);
|
||||||
|
memcpy (data, &nbytes, 4);
|
||||||
*xing_flags |= GST_XING_BYTES_FIELD;
|
*xing_flags |= GST_XING_BYTES_FIELD;
|
||||||
data += 4;
|
data += 4;
|
||||||
byte_count = GUINT32_FROM_BE (byte_count);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xing->seek_table != NULL && byte_count != 0
|
if (xing->seek_table != NULL && byte_count != 0
|
||||||
|
|
Loading…
Reference in a new issue