mirror of
https://github.com/mpv-player/mpv
synced 2025-02-27 10:50:53 +00:00
fixing --disable for mp3lib, liba52 and libmpeg2, patch by (basic (at) mozdev (dot) org), see also bug #102
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13580 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8dd84ac2bb
commit
b4f854c14c
27
Makefile
27
Makefile
@ -33,7 +33,7 @@ OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o)
|
||||
VO_LIBS = $(AA_LIB) $(X_LIB) $(SDL_LIB) $(GGI_LIB) $(MP1E_LIB) $(MLIB_LIB) $(SVGA_LIB) $(DIRECTFB_LIB) $(CACA_LIB)
|
||||
AO_LIBS = $(ARTS_LIB) $(ESD_LIB) $(JACK_LIB) $(NAS_LIB) $(SGIAUDIO_LIB)
|
||||
CODEC_LIBS = $(AV_LIB) $(FAME_LIB) $(MAD_LIB) $(VORBIS_LIB) $(THEORA_LIB) $(FAAD_LIB) $(LIBLZO_LIB) $(DECORE_LIB) $(XVID_LIB) $(DTS_LIB) $(PNG_LIB) $(Z_LIB) $(JPEG_LIB) $(ALSA_LIB) $(XMMS_LIB) $(X264_LIB)
|
||||
COMMON_LIBS = libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(DVDREAD_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FONTCONFIG_LIB) $(ENCA_LIB)
|
||||
COMMON_LIBS = libmpcodecs/libmpcodecs.a $(W32_LIB) $(DS_LIB) libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a $(DVDREAD_LIB) $(CODEC_LIBS) $(FREETYPE_LIB) $(TERMCAP_LIB) $(CDPARANOIA_LIB) $(MPLAYER_NETWORK_LIB) $(WIN32_LIB) $(GIF_LIB) $(MACOSX_FRAMEWORKS) $(SMBSUPPORT_LIB) $(FRIBIDI_LIB) $(FONTCONFIG_LIB) $(ENCA_LIB)
|
||||
|
||||
CFLAGS = $(OPTFLAGS) -Ilibmpdemux -Iloader -Ilibvo $(FREETYPE_INC) $(EXTRA_INC) $(CDPARANOIA_INC) $(SDL_INC) $(X11_INC) $(FRIBIDI_INC) $(DVB_INC) $(XVID_INC) $(FONTCONFIG_INC) $(CACA_INC) # -Wall
|
||||
ifeq ($(TOOLAME),yes)
|
||||
@ -41,7 +41,16 @@ CFLAGS += $(TOOLAME_EXTRAFLAGS)
|
||||
CODEC_LIBS += $(TOOLAME_LIB)
|
||||
endif
|
||||
|
||||
PARTS = libmpdemux libmpcodecs mp3lib liba52 libmpeg2 libavcodec libavformat libao2 drivers osdep postproc input libvo libaf
|
||||
PARTS = libmpdemux libmpcodecs libavcodec libavformat libao2 drivers osdep postproc input libvo libaf
|
||||
ifeq ($(MP3LIB),yes)
|
||||
PARTS += mp3lib
|
||||
endif
|
||||
ifeq ($(LIBA52),yes)
|
||||
PARTS += liba52
|
||||
endif
|
||||
ifeq ($(LIBMPEG2),yes)
|
||||
PARTS += libmpeg2
|
||||
endif
|
||||
ifeq ($(INTERNAL_FAAD),yes)
|
||||
COMMON_LIBS += libfaad2/libfaad2.a
|
||||
PARTS += libfaad2
|
||||
@ -74,8 +83,20 @@ ifeq ($(MENCODER),yes)
|
||||
ALL_PRG += $(PRG_MENCODER)
|
||||
endif
|
||||
|
||||
COMMON_DEPS = $(W32_DEP) $(DS_DEP) $(MP1E_DEP) $(AV_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a liba52/liba52.a mp3lib/libMP3.a libmpeg2/libmpeg2.a osdep/libosdep.a postproc/libswscale.a input/libinput.a libvo/libvo.a libaf/libaf.a
|
||||
COMMON_DEPS = $(W32_DEP) $(DS_DEP) $(MP1E_DEP) $(AV_DEP) libmpdemux/libmpdemux.a libmpcodecs/libmpcodecs.a libao2/libao2.a osdep/libosdep.a postproc/libswscale.a input/libinput.a libvo/libvo.a libaf/libaf.a
|
||||
|
||||
ifeq ($(MP3LIB),yes)
|
||||
COMMON_DEPS += mp3lib/libMP3.a
|
||||
COMMON_LIBS += mp3lib/libMP3.a
|
||||
endif
|
||||
ifeq ($(LIBA52),yes)
|
||||
COMMON_DEPS += liba52/liba52.a
|
||||
COMMON_LIBS += liba52/liba52.a
|
||||
endif
|
||||
ifeq ($(LIBMPEG2),yes)
|
||||
COMMON_DEPS += libmpeg2/libmpeg2.a
|
||||
COMMON_LIBS += libmpeg2/libmpeg2.a
|
||||
endif
|
||||
ifeq ($(INTERNAL_FAAD),yes)
|
||||
COMMON_DEPS += libfaad2/libfaad2.a
|
||||
endif
|
||||
|
8
configure
vendored
8
configure
vendored
@ -4989,7 +4989,7 @@ if test "$_liba52" = yes ; then
|
||||
_def_liba52='#define USE_LIBA52 1'
|
||||
_codecmodules="liba52 $_codecmodules"
|
||||
else
|
||||
_def_liba52'#undef USE_LIBA52'
|
||||
_def_liba52='#undef USE_LIBA52'
|
||||
_nocodecmodules="liba52 $_nocodecmodules"
|
||||
fi
|
||||
echores "$_liba52"
|
||||
@ -5019,7 +5019,7 @@ if test "$_libmpeg2" = yes ; then
|
||||
_def_libmpeg2='#define USE_LIBMPEG2 1'
|
||||
_codecmodules="libmpeg2 $_codecmodules"
|
||||
else
|
||||
_def_libmpeg2'#undef USE_LIBMPEG2'
|
||||
_def_libmpeg2='#undef USE_LIBMPEG2'
|
||||
_nocodecmodules="libmpeg2 $_nocodecmodules"
|
||||
fi
|
||||
echores "$_libmpeg2"
|
||||
@ -6294,6 +6294,10 @@ MATROSKA = $_matroska_internal
|
||||
|
||||
OPENDIVX = $_opendivx
|
||||
|
||||
MP3LIB = $_mp3lib
|
||||
LIBA52 = $_liba52
|
||||
LIBMPEG2 = $_libmpeg2
|
||||
|
||||
UNRARLIB = $_unrarlib
|
||||
HAVE_FFPOSTPROCESS = $_def_haveffpostprocess
|
||||
PNG = $_mkf_png
|
||||
|
@ -374,6 +374,7 @@ typedef struct {
|
||||
} tsdemux_init_t;
|
||||
|
||||
|
||||
#ifdef USE_LIBA52
|
||||
//second stage: returns the count of A52 syncwords found
|
||||
static int a52_check(char *buf, int len)
|
||||
{
|
||||
@ -401,6 +402,7 @@ static int a52_check(char *buf, int len)
|
||||
mp_msg(MSGT_DEMUXER, MSGL_V, "A52_CHECK(%d input bytes), found %d frame syncwords of %d bytes length\n", len, ok, frame_length);
|
||||
return ok;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
@ -432,6 +434,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
pos = stream_tell(demuxer->stream);
|
||||
if(ts_parse(demuxer, &es, tmp, 1))
|
||||
{
|
||||
#ifdef USE_LIBA52
|
||||
//Non PES-aligned A52 audio may escape detection if PMT is not present;
|
||||
//in this case we try to find at least 3 A52 syncwords
|
||||
if((es.type == PES_PRIVATE1) && (! audio_found))
|
||||
@ -449,6 +452,7 @@ static off_t ts_detect_streams(demuxer_t *demuxer, tsdemux_init_t *param)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
is_audio = ((es.type == AUDIO_MP2) || (es.type == AUDIO_A52) || (es.type == AUDIO_LPCM_BE) || (es.type == AUDIO_AAC));
|
||||
is_video = ((es.type == VIDEO_MPEG1) || (es.type == VIDEO_MPEG2) || (es.type == VIDEO_MPEG4));
|
||||
|
Loading…
Reference in New Issue
Block a user