1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

makes --enable-*-faad really enable without any further check and drop support for old external faad2 versions (<= 1.1)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14639 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
aurel 2005-02-03 17:35:49 +00:00
parent ac8b01d505
commit b6e4a79712
3 changed files with 5 additions and 43 deletions

View File

@ -21,6 +21,7 @@ MPlayer (1.0)
* fixed decoding of stereo alaw files
* preload QT DLLs to work around problems with their hardcoded paths
* support for Real 10 RV30/40 binary codec
* dropped support of old faad2 versions (<= 1.1)
Demuxers:
* vqf demuxer

34
configure vendored
View File

@ -5319,7 +5319,10 @@ if test "$_faad_external" != no ; then
_faad_external=no
cat > $TMPC << EOF
#include <faad.h>
int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); return 0; }
#ifndef FAAD_MIN_STREAMSIZE
#error Too old version
#endif
int main(void) { faacDecHandle testhand; faacDecFrameInfo testinfo; testhand = faacDecOpen(); faacDecInit(0, 0, 0, 0, 0); return 0; }
EOF
cc_check $_inc_faad $_ld_faad $_ld_lm && _faad_external=yes
fi
@ -5328,34 +5331,6 @@ else
echores "no"
fi
if test "$_faad_internal" = yes -o "$_faad_external" = yes; then
echocheck "FAAD2 version"
cat > $TMPC <<EOF
#include <faad.h>
#ifndef FAAD_MIN_STREAMSIZE
#error Too old version
#endif
int main(void) {
#ifdef FAAD2_VERSION
printf("%s\n",FAAD2_VERSION);
#else
printf("1.0\n");
#endif
return 0;
}
EOF
if cc_check -I- $_inc_faad $_ld_faad $_ld_lm && "$TMPO" >> "$TMPLOG" ; then
_faad_version=`"$TMPO"`
_faad_tempversion=`"$TMPO" | sed -e 's/^\([0-9]\{1,\}\)\.\([0-9]\{1,\}\).*/\1\2/'`
_def_faad_version="#define FAADVERSION $_faad_tempversion"
echores "$_faad_version"
else
_faad_external=no
_faad_internal=no
echores "failed to get version"
fi
fi
if test "$_faad_external" = yes; then
_def_faad='#define HAVE_FAAD 1'
_codecmodules="faad2(external) $_codecmodules"
@ -7345,7 +7320,6 @@ $_def_matroska
/* enable FAAD (AAC) support */
$_def_faad
$_def_faad_internal
$_def_faad_version
/* enable LADSPA plugin support */
$_def_ladspa

View File

@ -122,13 +122,8 @@ static int init(sh_audio_t *sh)
}
/* init the codec */
#if (FAADVERSION <= 11)
faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
&faac_samplerate, &faac_channels);
#else
faac_init = faacDecInit(faac_hdec, sh->a_in_buffer,
sh->a_in_buffer_len, &faac_samplerate, &faac_channels);
#endif
sh->a_in_buffer_len -= (faac_init > 0)?faac_init:0; // how many bytes init consumed
// XXX FIXME: shouldn't we memcpy() here in a_in_buffer ?? --A'rpi
@ -227,11 +222,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
if(!sh->codecdata_len){
// raw aac stream:
do {
#if (FAADVERSION <= 11)
faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, sh->a_in_buffer+j);
#else
faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, sh->a_in_buffer+j, sh->a_in_buffer_len);
#endif
/* update buffer index after faacDecDecode */
if(faac_finfo.bytesconsumed >= sh->a_in_buffer_len) {
@ -253,11 +244,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
unsigned char* bufptr=NULL;
int buflen=ds_get_packet(sh->ds, &bufptr);
if(buflen<=0) break;
#if (FAADVERSION <= 11)
faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, bufptr);
#else
faac_sample_buffer = faacDecDecode(faac_hdec, &faac_finfo, bufptr, buflen);
#endif
// printf("FAAC decoded %d of %d (err: %d) \n",faac_finfo.bytesconsumed,buflen,faac_finfo.error);
}