Commit 312c06ef authored by Marvin Scholz's avatar Marvin Scholz

avcodec: remove avcodec-fast support

The avcodec-fast option, if enabled, sets the AV_CODEC_FLAG2_FAST
option. Using AV_CODEC_FLAG2_FAST can cause use of unsafe code in
avcodec which could lead to crashes.
parent d309915f
...@@ -118,7 +118,7 @@ vlc_module_begin () ...@@ -118,7 +118,7 @@ vlc_module_begin ()
add_obsolete_integer( "avcodec-vismv" ) /* removed since 3.0.0 */ add_obsolete_integer( "avcodec-vismv" ) /* removed since 3.0.0 */
add_obsolete_integer ( "ffmpeg-lowres" ) /* removed since 2.1.0 */ add_obsolete_integer ( "ffmpeg-lowres" ) /* removed since 2.1.0 */
add_obsolete_bool( "ffmpeg-fast" ) /* removed since 2.1.0 */ add_obsolete_bool( "ffmpeg-fast" ) /* removed since 2.1.0 */
add_bool( "avcodec-fast", false, FAST_TEXT, FAST_LONGTEXT, false ) add_obsolete_bool( "avcodec-fast" ) /* removed since 4.0.0 */
add_obsolete_integer ( "ffmpeg-skiploopfilter" ) /* removed since 2.1.0 */ add_obsolete_integer ( "ffmpeg-skiploopfilter" ) /* removed since 2.1.0 */
add_integer ( "avcodec-skiploopfilter", 0, SKIPLOOPF_TEXT, add_integer ( "avcodec-skiploopfilter", 0, SKIPLOOPF_TEXT,
SKIPLOOPF_LONGTEXT, false) SKIPLOOPF_LONGTEXT, false)
......
...@@ -84,10 +84,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *, const AVCodec * ); ...@@ -84,10 +84,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *, const AVCodec * );
"when there is not enough time. It's useful with low CPU power " \ "when there is not enough time. It's useful with low CPU power " \
"but it can produce distorted pictures.") "but it can produce distorted pictures.")
#define FAST_TEXT N_("Allow speed tricks")
#define FAST_LONGTEXT N_( \
"Allow non specification compliant speedup tricks. Faster but error-prone.")
#define SKIP_FRAME_TEXT N_("Skip frame (default=0)") #define SKIP_FRAME_TEXT N_("Skip frame (default=0)")
#define SKIP_FRAME_LONGTEXT N_( \ #define SKIP_FRAME_LONGTEXT N_( \
"Force skipping of frames to speed up decoding " \ "Force skipping of frames to speed up decoding " \
......
...@@ -573,9 +573,6 @@ int InitVideoDec( vlc_object_t *obj ) ...@@ -573,9 +573,6 @@ int InitVideoDec( vlc_object_t *obj )
else if( i_val == 1 ) p_context->skip_loop_filter = AVDISCARD_NONREF; else if( i_val == 1 ) p_context->skip_loop_filter = AVDISCARD_NONREF;
else p_context->skip_loop_filter = AVDISCARD_DEFAULT; else p_context->skip_loop_filter = AVDISCARD_DEFAULT;
if( var_CreateGetBool( p_dec, "avcodec-fast" ) )
p_context->flags2 |= AV_CODEC_FLAG2_FAST;
/* ***** libavcodec frame skipping ***** */ /* ***** libavcodec frame skipping ***** */
p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" ); p_sys->b_hurry_up = var_CreateGetBool( p_dec, "avcodec-hurry-up" );
p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" ); p_sys->b_show_corrupted = var_CreateGetBool( p_dec, "avcodec-corrupted" );
......
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