mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +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>
|
||||
|
||||
* ext/lame/gstlame.c: (gst_lame_setup):
|
||||
|
|
|
@ -330,12 +330,19 @@ generate_xing_header (GstXingMux * xing)
|
|||
}
|
||||
|
||||
if (byte_count != 0) {
|
||||
GST_DEBUG ("Setting number of bytes to %u", byte_count);
|
||||
byte_count = GUINT32_TO_BE (byte_count);
|
||||
memcpy (data, &byte_count, 4);
|
||||
guint32 nbytes;
|
||||
|
||||
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;
|
||||
data += 4;
|
||||
byte_count = GUINT32_FROM_BE (byte_count);
|
||||
}
|
||||
}
|
||||
|
||||
if (xing->seek_table != NULL && byte_count != 0
|
||||
|
|
Loading…
Reference in a new issue