]> git.sesse.net Git - vlc/commitdiff
Add gui option one libav/ffmpeg flag2 parameter
authorVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 4 Feb 2013 17:00:21 +0000 (18:00 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 11 Feb 2013 19:57:45 +0000 (21:57 +0200)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/video.c

index aa17d987e1a5e6479ada09e1b19a69c6d81700e6..456a4a903fada6fc2022c2d0e5d2dc4bb0fceecf 100644 (file)
@@ -129,6 +129,10 @@ vlc_module_begin ()
                   SKIPLOOPF_LONGTEXT, false)
         change_safe ()
         change_integer_list( nloopf_list, nloopf_list_text )
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 41, 0 )
+    add_bool( "avcodec-ignorecrop", false, IGNORECROP_TEXT, IGNORECROP_LONGTEXT,
+        true )
+#endif
 
     add_obsolete_integer( "ffmpeg-debug" ) /* removed since 2.1.0 */
     add_integer( "avcodec-debug", 0, DEBUG_TEXT, DEBUG_LONGTEXT,
index 8c8dd20ed3400527cab84265f4442bf06eb06f8d..12b21d9c18ddee1b3fe0a636b63e5ff8be259cb9 100644 (file)
@@ -110,6 +110,9 @@ int ffmpeg_OpenCodec( decoder_t *p_dec );
     "Force skipping of idct to speed up decoding for frame types " \
     "(-1=None, 0=Default, 1=B-frames, 2=P-frames, 3=B+P frames, 4=all frames)." )
 
+#define IGNORECROP_TEXT N_("Discard cropping information")
+#define IGNORECROP_LONGTEXT N_("Discard internal cropping parameters (e.g. from H.264 SPS)." )
+
 #define DEBUG_TEXT N_( "Debug mask" )
 #define DEBUG_LONGTEXT N_( "Set FFmpeg debug mask" )
 
index 5595fe1120378b3e63399e3cc73c338a58b0a19f..062068f8b6219a595c44e817fffc4e0d01ee012e 100644 (file)
@@ -237,6 +237,11 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     if( var_CreateGetBool( p_dec, "avcodec-fast" ) )
         p_sys->p_context->flags2 |= CODEC_FLAG2_FAST;
 
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 54, 41, 0 )
+    if( var_InheritBool( p_dec, "avcodec-ignorecrop" ) )
+        p_sys->p_context->flags2 |= CODEC_FLAG2_IGNORE_CROP;
+#endif
+
     /* ***** libavcodec frame skipping ***** */
     p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" );