[FFmpeg-devel] [PATCH 1/2] avcodec/options_table: set err_detect to careful by default

Michael Niedermayer michaelni at gmx.at
Mon Oct 28 17:00:15 CET 2013


This ensures that checks that are a reliable and fast way to detect errors
are enabled and can trigger error concealment so as to improve the
presentation of damaged files.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 doc/APIchanges             |    3 +++
 libavcodec/options_table.h |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 456b35c..e44a8b8 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil:     2012-10-22
 
 API changes, most recent first:
 
+2013-10-XX - xxxxxxx - lavc 55.XX.XXX - avcodec.h
+  Change default err_recognition to AV_EF_CAREFUL
+
 2013-10-27 - xxxxxxx - lavc 55.39.100 - avcodec.h
   Add CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
 
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 8912ff6..6c38e1b 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -144,7 +144,7 @@ static const AVOption avcodec_options[] = {
 {"unofficial", "allow unofficial extensions", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_UNOFFICIAL }, INT_MIN, INT_MAX, V|D|E, "strict"},
 {"experimental", "allow non-standardized experimental things", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, V|D|E, "strict"},
 {"b_qoffset", "QP offset between P- and B-frames", OFFSET(b_quant_offset), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
-{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.i64 = 0 }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
+{"err_detect", "set error detection flags", OFFSET(err_recognition), AV_OPT_TYPE_FLAGS, {.i64 = AV_EF_CAREFUL }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
 {"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
 {"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
 {"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.i64 = AV_EF_BUFFER }, INT_MIN, INT_MAX, A|V|D, "err_detect"},
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list