ref: 519d283e3ff39a129ed2b095a5f673f518291756
parent: b737ae4a9564da46ca31b70be2c87df22b1fbeb8
author: menno <menno>
date: Sun Aug 6 14:57:15 EDT 2006
Latest changes: make faad2 compile on linux with the xmms plugin; fix incorrect SBR detection in extended AudioSpecificConfig.
--- a/libfaad/mp4.c
+++ b/libfaad/mp4.c
@@ -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 @@
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 @@
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"));
--- a/plugins/xmms/src/Makefile.am
+++ b/plugins/xmms/src/Makefile.am
@@ -5,7 +5,7 @@
-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
--- a/plugins/xmms/src/aac_utils.c
+++ b/plugins/xmms/src/aac_utils.c
@@ -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 @@
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 @@
}
if(fseek(fd, frameLength-ADTS_HEADER_SIZE, SEEK_CUR)==-1){
break;
- }
+ }
}
(*seekTableLength) = seconds;
fseek(fd, originPosition, SEEK_SET);