[Mplayer-cvslog] CVS: main dec_audio.c,1.67,1.68
Arpi of Ize
arpi at mplayer.dev.hu
Sun Dec 30 04:14:45 CET 2001
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv10936
Modified Files:
dec_audio.c
Log Message:
libac3 disabled
Index: dec_audio.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_audio.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- dec_audio.c 29 Dec 2001 04:20:29 -0000 1.67
+++ dec_audio.c 30 Dec 2001 03:14:30 -0000 1.68
@@ -1,5 +1,6 @@
#define USE_G72X
+//#define USE_LIBAC3
#include <stdio.h>
#include <stdlib.h>
@@ -26,7 +27,10 @@
#include "dll_init.h"
#include "mp3lib/mp3.h"
+
+#ifdef USE_LIBAC3
#include "libac3/ac3.h"
+#endif
#include "liba52/a52.h"
static sample_t * a52_samples;
@@ -250,6 +254,7 @@
static sh_audio_t* dec_audio_sh=NULL;
+#ifdef USE_LIBAC3
// AC3 decoder buffer callback:
static void ac3_fill_buffer(uint8_t **start,uint8_t **end){
int len=ds_get_packet(dec_audio_sh->ds,start);
@@ -259,6 +264,7 @@
else
*end = *start + len;
}
+#endif
// MP3 decoder buffer callback:
int mplayer_audio_read(char *buf,int size){
@@ -468,6 +474,10 @@
break;
}
case AFM_AC3: {
+#ifndef USE_LIBAC3
+ mp_msg(MSGT_DECAUDIO,MSGL_WARN,"WARNING: libac3 support is disabled. (hint: upgrade codecs.conf)\n");
+ driver=0;
+#else
// Dolby AC3 audio:
dec_audio_sh=sh_audio; // save sh_audio for the callback:
ac3_config.fill_buffer_callback = ac3_fill_buffer;
@@ -491,6 +501,7 @@
} else {
driver=0; // bad frame -> disable audio
}
+#endif
break;
}
case AFM_A52: {
@@ -1056,6 +1067,7 @@
len=2*fox62_adpcm_decode_block((unsigned short*)buf,ibuf, sh_audio->wf->nChannels);
break;
}
+#ifdef USE_LIBAC3
case AFM_AC3: // AC3 decoder
//printf("{1:%d}",avi_header.idx_pos);fflush(stdout);
if(!sh_audio->ac3_frame) sh_audio->ac3_frame=ac3_decode_frame();
@@ -1067,6 +1079,7 @@
}
//printf("{3:%d}",avi_header.idx_pos);fflush(stdout);
break;
+#endif
case AFM_A52: { // AC3 decoder
int flags=0;
int i;
@@ -1205,12 +1218,14 @@
ogg_stream_reset(&sh_audio->ov->os);
break;
#endif
+#ifdef USE_LIBAC3
case AFM_AC3:
ac3_bitstream_reset(); // reset AC3 bitstream buffer
// if(verbose){ printf("Resyncing AC3 audio...");fflush(stdout);}
sh_audio->ac3_frame=ac3_decode_frame(); // resync
// if(verbose) printf(" OK!\n");
break;
+#endif
case AFM_A52:
case AFM_ACM:
case AFM_DSHOW:
@@ -1233,7 +1248,9 @@
void skip_audio_frame(sh_audio_t *sh_audio){
switch(sh_audio->codec->driver){
case AFM_MPEG: MP3_DecodeFrame(NULL,-2);break; // skip MPEG frame
+#ifdef USE_LIBAC3
case AFM_AC3: sh_audio->ac3_frame=ac3_decode_frame();break; // skip AC3 frame
+#endif
case AFM_HWAC3:
case AFM_A52: a52_fillbuff(sh_audio);break; // skip AC3 frame
case AFM_ACM:
More information about the MPlayer-cvslog
mailing list