~ft/aacdec

519d283e3ff39a129ed2b095a5f673f518291756 — menno 15 years ago b737ae4
Latest changes: make faad2 compile on linux with the xmms plugin; fix incorrect SBR detection in extended AudioSpecificConfig.
3 files changed, 10 insertions(+), 5 deletions(-)

M libfaad/mp4.c
M plugins/xmms/src/Makefile.am
M plugins/xmms/src/aac_utils.c
M libfaad/mp4.c => libfaad/mp4.c +6 -2
@@ 27,7 27,7 @@
** Commercial non-GPL licensing of this software is possible.
** For more info contact Nero AG through Mpeg4AAClicense@nero.com.
**
** $Id: mp4.c,v 1.34 2006/05/07 18:09:01 menno Exp $
** $Id: mp4.c,v 1.35 2006/08/06 18:57:15 menno Exp $
**/

#include "common.h"


@@ 245,7 245,7 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,

        if (syncExtensionType == 0x2b7)
        {
            mp4ASC->objectTypeIndex = (uint8_t)faad_getbits(&ld, 5
            uint8_t tmp_OTi = (uint8_t)faad_getbits(&ld, 5
                DEBUGVAR(1,10,"parse_audio_decoder_specific_info(): extensionAudioObjectType"));

            if (mp4ASC->objectTypeIndex == 5)


@@ 256,6 256,10 @@ int8_t AudioSpecificConfig2(uint8_t *pBuffer,
                if (mp4ASC->sbr_present_flag)
                {
                    uint8_t tmp;

					/* Don't set OT to SBR until checked that it is actually there */
					mp4ASC->objectTypeIndex = tmp_OTi;

                    tmp = (uint8_t)faad_getbits(&ld, 4
                        DEBUGVAR(1,12,"parse_audio_decoder_specific_info(): extensionSamplingFrequencyIndex"));


M plugins/xmms/src/Makefile.am => plugins/xmms/src/Makefile.am +1 -1
@@ 5,7 5,7 @@ libmp4_la_CFLAGS = `$(XMMS_CONFIG) --cflags` -Wall \
       -I$(top_srcdir)/include -I$(top_srcdir)/common/mp4ff

libmp4_la_LIBADD = $(top_builddir)/libfaad/libfaad.la \
       $(top_builddir)/common/mp4ff/libmp4ff.a
       $(top_builddir)/common/mp4ff/libmp4ff.la

libmp4_la_LDFLAGS = -module -avoid-version `$(XMMS_CONFIG) --libs` -lpthread


M plugins/xmms/src/aac_utils.c => plugins/xmms/src/aac_utils.c +3 -2
@@ 5,6 5,7 @@
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#define ADTS_HEADER_SIZE        8


@@ 20,7 21,7 @@ int	getAacInfo(FILE *fd)
  unsigned char	header[ADTS_HEADER_SIZE];
  unsigned int	id;
  unsigned long	originPosition;
  

  originPosition = ftell(fd);
  if(fread(header, 1, ADTS_HEADER_SIZE, fd) != ADTS_HEADER_SIZE){
    fseek(fd, originPosition, SEEK_SET);


@@ 96,7 97,7 @@ void	checkADTSForSeeking(FILE *fd,
    }
    if(fseek(fd, frameLength-ADTS_HEADER_SIZE, SEEK_CUR)==-1){
      break;
    } 
    }
  }
  (*seekTableLength) = seconds;
  fseek(fd, originPosition, SEEK_SET);