#include "avcodec.h"
#include "avutil.h"
-#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT( 51, 48, 0 )
-# error You must update libavcodec to a version >= 51.48.0
+#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
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define MODULE_DESCRIPTION N_( "Various audio and video decoders/encoders" \
+#define MODULE_DESCRIPTION N_( "Various audio and video decoders/encoders " \
"delivered by the FFmpeg library. This includes (MS)MPEG4, DivX, SV1,"\
"H261, H263, H264, WMV, WMA, AAC, AMR, DV, MJPEG and other codecs")
set_shortname( "FFmpeg")
add_shortcut( "ffmpeg" )
set_category( CAT_INPUT )
- set_subcategory( SUBCAT_INPUT_SCODEC )
+ set_subcategory( SUBCAT_INPUT_VCODEC )
/* decoder main module */
#if defined(MODULE_NAME_is_ffmpegaltivec) \
|| (defined(CAN_COMPILE_ALTIVEC) && !defined(NO_ALTIVEC_IN_FFMPEG))
p_context = avcodec_alloc_context();
if( !p_context )
return VLC_ENOMEM;
- p_context->debug = config_GetInt( p_dec, "ffmpeg-debug" );
+ p_context->debug = var_InheritInteger( p_dec, "ffmpeg-debug" );
p_context->opaque = (void *)p_this;
/* Set CPU capabilities */
i_result = VLC_EGENERIC;
}
- if( i_result == VLC_SUCCESS ) p_dec->p_sys->i_cat = i_cat;
+ if( i_result == VLC_SUCCESS )
+ {
+ p_dec->p_sys->i_cat = i_cat;
+ if( p_context->profile != FF_PROFILE_UNKNOWN)
+ p_dec->fmt_in.i_profile = p_context->profile;
+ if( p_context->level != FF_LEVEL_UNKNOWN)
+ p_dec->fmt_in.i_level = p_context->level;
+ }
return i_result;
}