Commit 88041dfe authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Force avcodec to be at least 52.25.0 and avfomat 52.30.0...

They are more than 1 year old...
parent 9d14d571
......@@ -2635,7 +2635,7 @@ AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
if test "${enable_avcodec}" != "no"
then
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.2.0 libavutil],
PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
......@@ -2745,7 +2745,7 @@ AC_ARG_ENABLE(avformat,
[ --enable-avformat libavformat containers (default enabled)])
if test "${enable_avformat}" != "no"
then
PKG_CHECK_MODULES(AVFORMAT,[libavformat libavutil],
PKG_CHECK_MODULES(AVFORMAT,[libavformat > 52.30.0 libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
......
......@@ -48,10 +48,8 @@
#include "avcodec.h"
#include "avutil.h"
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 2, 0 )
# error You must update libavcodec to a version >= 52.2.0
#elif LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
# warning You should update libavcodec to get subtitle support
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 52, 25, 0 )
# error You must update libavcodec to a version >= 52.25.0
#endif
/*****************************************************************************
......@@ -314,13 +312,11 @@ static int OpenDecoder( vlc_object_t *p_this )
i_result = InitAudioDec ( p_dec, p_context, p_codec,
i_codec_id, psz_namecodec );
break;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 25, 0 )
case SPU_ES:
p_dec->pf_decode_sub = DecodeSubtitle;
i_result = InitSubtitleDec( p_dec, p_context, p_codec,
i_codec_id, psz_namecodec );
break;
#endif
default:
i_result = VLC_EGENERIC;
}
......@@ -353,11 +349,9 @@ static void CloseDecoder( vlc_object_t *p_this )
case VIDEO_ES:
EndVideoDec ( p_dec );
break;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 25, 0 )
case SPU_ES:
EndSubtitleDec( p_dec );
break;
#endif
}
if( p_sys->p_context )
......
......@@ -128,12 +128,8 @@ static const struct
{ VLC_CODEC_RV10, CODEC_ID_RV10, VIDEO_ES },
{ VLC_CODEC_RV13, CODEC_ID_RV10, VIDEO_ES },
{ VLC_CODEC_RV20, CODEC_ID_RV20, VIDEO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 8, 0 )
{ VLC_CODEC_RV30, CODEC_ID_RV30, VIDEO_ES },
#endif
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 5, 0 )
{ VLC_CODEC_RV40, CODEC_ID_RV40, VIDEO_ES },
#endif
{ VLC_CODEC_RPZA, CODEC_ID_RPZA, VIDEO_ES },
......@@ -347,9 +343,7 @@ static const struct
{ VLC_CODEC_VORBIS, CODEC_ID_VORBIS, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 6, 0 )
{ VLC_CODEC_QCELP, CODEC_ID_QCELP, AUDIO_ES },
#endif
{ VLC_CODEC_SPEEX, CODEC_ID_SPEEX, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 34, 0 )
{ VLC_CODEC_TWINVQ, CODEC_ID_TWINVQ, AUDIO_ES },
......@@ -370,9 +364,7 @@ static const struct
{ VLC_CODEC_SHORTEN, CODEC_ID_SHORTEN, AUDIO_ES },
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 22, 0 )
{ VLC_CODEC_TRUEHD, CODEC_ID_TRUEHD, AUDIO_ES },
#endif
{ VLC_CODEC_MLP, CODEC_ID_MLP, AUDIO_ES },
......
......@@ -658,13 +658,9 @@ picture_t *DecodeVideo( decoder_t *p_dec, block_t **pp_block )
}
else if( p_context->time_base.den > 0 )
{
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52,20,0)
int i_tick = p_context->ticks_per_frame;
if( i_tick <= 0 )
i_tick = 1;
#else
int i_tick = 1;
#endif
p_sys->i_pts += INT64_C(1000000) *
(2 + p_sys->p_ff_pic->repeat_pict) *
......
......@@ -59,10 +59,6 @@
# define HAVE_FFMPEG_CODEC_ATTACHMENT 1
#endif
#if (LIBAVFORMAT_VERSION_INT >= ((52<<16)+(15<<8)+0) )
# define HAVE_FFMPEG_CHAPTERS 1
#endif
/*****************************************************************************
* demux_sys_t: demux descriptor
*****************************************************************************/
......@@ -273,11 +269,7 @@ int OpenDemux( vlc_object_t *p_this )
fmt.i_bitrate = cc->bit_rate;
fmt.audio.i_channels = cc->channels;
fmt.audio.i_rate = cc->sample_rate;
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
fmt.audio.i_bitspersample = cc->bits_per_sample;
#else
fmt.audio.i_bitspersample = cc->bits_per_coded_sample;
#endif
fmt.audio.i_blockalign = cc->block_align;
psz_type = "audio";
break;
......@@ -472,7 +464,6 @@ int OpenDemux( vlc_object_t *p_this )
( p_sys->ic->duration != (int64_t)AV_NOPTS_VALUE ) ?
p_sys->ic->duration * 1000000 / AV_TIME_BASE : -1 );
#ifdef HAVE_FFMPEG_CHAPTERS
if( p_sys->ic->nb_chapters > 0 )
p_sys->p_title = vlc_input_title_New();
for( i = 0; i < p_sys->ic->nb_chapters; i++ )
......@@ -491,7 +482,6 @@ int OpenDemux( vlc_object_t *p_this )
(i_start_time != -1 ? i_start_time : 0 );
TAB_APPEND( p_sys->p_title->i_seekpoint, p_sys->p_title->seekpoint, s );
}
#endif
return VLC_SUCCESS;
}
......
......@@ -151,11 +151,7 @@ int OpenMux( vlc_object_t *p_this )
return VLC_EGENERIC;
}
#if LIBAVFORMAT_VERSION_INT >= ((52<<16)+(0<<8)+0)
p_sys->oc->pb = &p_sys->io;
#else
p_sys->oc->pb = p_sys->io;
#endif
p_sys->oc->nb_streams = 0;
p_sys->b_write_header = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment