mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
ext/mad/gstmad.c: fix xing header detection on mono and stereo mp3 files.
Original commit message from CVS: 2004-12-01 Christophe Fergeau <teuf@gnome.org> * ext/mad/gstmad.c: (mpg123_parse_xing_header): fix xing header detection on mono and stereo mp3 files.
This commit is contained in:
parent
6ffaa3fce2
commit
3e3cca4adf
2 changed files with 9 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-12-01 Christophe Fergeau <teuf@gnome.org>
|
||||
|
||||
* ext/mad/gstmad.c: (mpg123_parse_xing_header): fix xing header
|
||||
detection on mono and stereo mp3 files.
|
||||
|
||||
2004-12-01 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/playback/gstplaybasebin.c: (gst_play_base_bin_change_state):
|
||||
|
|
|
@ -1008,7 +1008,7 @@ is_xhead (unsigned char *buf)
|
|||
|
||||
|
||||
#undef LOG
|
||||
//#define LOG
|
||||
/*#define LOG*/
|
||||
#ifdef LOG
|
||||
#define lprintf(x...) g_print(x)
|
||||
#else
|
||||
|
@ -1025,23 +1025,18 @@ mpg123_parse_xing_header (struct mad_header *header,
|
|||
int xflags, xframes, xbytes, xvbr_scale;
|
||||
int abr;
|
||||
guint8 xtoc[XING_TOC_LENGTH];
|
||||
|
||||
/* This should be the MPEG Audio version ID
|
||||
* (version 2.5, 2 or 1) least significant byte, but mad doesn't
|
||||
* provide that, so assume it's always MPEG 1
|
||||
*/
|
||||
int lsf_bit = 1;
|
||||
int lsf_bit = !(header->flags & MAD_FLAG_LSF_EXT);
|
||||
|
||||
xframes = xbytes = 0;
|
||||
|
||||
/* offset of the Xing header */
|
||||
if (lsf_bit) {
|
||||
if (header->mode != MAD_MODE_STEREO)
|
||||
if (header->mode != MAD_MODE_SINGLE_CHANNEL)
|
||||
ptr += (32 + 4);
|
||||
else
|
||||
ptr += (17 + 4);
|
||||
} else {
|
||||
if (header->mode != MAD_MODE_STEREO)
|
||||
if (header->mode != MAD_MODE_SINGLE_CHANNEL)
|
||||
ptr += (17 + 4);
|
||||
else
|
||||
ptr += (9 + 4);
|
||||
|
|
Loading…
Reference in a new issue