]> git.sesse.net Git - vlc/blobdiff - modules/codec/avcodec/avcodec.c
Avcodec: bump required version to 52.2.0
[vlc] / modules / codec / avcodec / avcodec.c
index 56c818370d67788071d9b2b419cc48d9b6d9e6ae..ccd84ad2eccbc788cfd4e450f37cd68b4785f1ba 100644 (file)
@@ -48,8 +48,8 @@
 #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
@@ -87,7 +87,7 @@ static const char *const enc_hq_list_text[] = {
 /*****************************************************************************
  * 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")
 
@@ -95,7 +95,7 @@ vlc_module_begin ()
     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))
@@ -254,7 +254,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     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 */
@@ -321,7 +321,14 @@ static int OpenDecoder( vlc_object_t *p_this )
         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;
 }