[vlc-commits] [Git][videolan/vlc][master] modules: avcodec: remove avcodec-error-resilience option
Marvin Scholz (@ePirat)
gitlab at videolan.org
Fri Mar 13 22:53:31 UTC 2026
Marvin Scholz pushed to branch master at VideoLAN / VLC
Commits:
09aef827 by Marvin Scholz at 2026-03-13T22:36:45+00:00
modules: avcodec: remove avcodec-error-resilience option
This option is highly misleading, it maps to the "err_detect" option,
but the description implies this is the amount of error resilience from
low to high, in a range from 0 to 4, and a default value of 1.
However this does not correspond at all to how this bitfield is used in
avcoded. That default value of 1 would actually map to AV_EF_CRCCHECK
and the max can go way higher than 4, so this isn't a simple
"be less strict the higher the number is" setting.
Instead of trying to map this in a reasonable way, the easiest seems to
just remove the option and have users that need this setting use
--avcodec-options "{err_detect =...}" instead. After all this is
a highly advanced setting that requires careful reading of the
possible values in the ffmpeg documentation.
This also implicitly changes the default value of this option to
0, the default in ffmpeg, which is probably a good idea as most users
prefer their files to keep playing despite errors.
- - - - -
3 changed files:
- modules/codec/avcodec/avcodec.c
- modules/codec/avcodec/avcodec.h
- modules/codec/avcodec/video.c
Changes:
=====================================
modules/codec/avcodec/avcodec.c
=====================================
@@ -106,8 +106,7 @@ vlc_module_begin ()
add_bool( "avcodec-dr", true, DR_TEXT, NULL )
add_bool( "avcodec-corrupted", true, CORRUPTED_TEXT, CORRUPTED_LONGTEXT )
- add_integer ( "avcodec-error-resilience", 1, ERROR_TEXT,
- ERROR_LONGTEXT )
+ add_obsolete_integer ( "avcodec-error-resilience" ) /* removed since 4.0.0 */
add_obsolete_integer ( "avcodec-workaround-bugs" ) /* removed since 4.0.0 */
add_bool( "avcodec-hurry-up", true, HURRYUP_TEXT, HURRYUP_LONGTEXT )
add_integer( "avcodec-skip-frame", 0, SKIP_FRAME_TEXT,
=====================================
modules/codec/avcodec/avcodec.h
=====================================
@@ -59,13 +59,6 @@ int ffmpeg_OpenCodec( decoder_t *p_dec, AVCodecContext *, const AVCodec * );
#define CORRUPTED_TEXT N_("Show corrupted frames")
#define CORRUPTED_LONGTEXT N_("Prefer visual artifacts instead of missing frames")
-#define ERROR_TEXT N_("Error resilience")
-#define ERROR_LONGTEXT N_( \
- "libavcodec can do error resilience.\n" \
- "However, with a buggy encoder (such as the ISO MPEG-4 encoder from M$) " \
- "this can produce a lot of errors.\n" \
- "Valid values range from 0 to 4 (0 disables all errors resilience).")
-
#define HURRYUP_TEXT N_("Hurry up")
#define HURRYUP_LONGTEXT N_( \
"The decoder can partially decode or skip frame(s) " \
=====================================
modules/codec/avcodec/video.c
=====================================
@@ -549,9 +549,6 @@ static int InitVideoDecCommon( decoder_t *p_dec )
p_dec->fmt_in->i_original_fourcc : p_dec->fmt_in->i_codec );
/* ***** Get configuration of ffmpeg plugin ***** */
- p_context->err_recognition =
- var_InheritInteger( p_dec, "avcodec-error-resilience" );
-
if( var_CreateGetBool( p_dec, "grayscale" ) )
p_context->flags |= AV_CODEC_FLAG_GRAY;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/09aef8273030f2d6bd0052581942ec630d168fc0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/09aef8273030f2d6bd0052581942ec630d168fc0
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list