---
 libavformat/avformat.h |    2 +-
 libavformat/avidec.c   |    4 ++--
 libavformat/options.c  |    8 +++++---
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index fff911a..155fc03 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1111,7 +1111,7 @@ typedef struct AVFormatContext {
      * - encoding: unused
      * - decoding: Set by user.
      */
-    int error_recognition;
+    int err_recognition;
 
     /**
      * Custom interrupt callbacks for the I/O layer.
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b45224f..5829164 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -666,7 +666,7 @@ static int avi_read_header(AVFormatContext *s, 
AVFormatParameters *ap)
         case MKTAG('i', 'n', 'd', 'x'):
             i= avio_tell(pb);
             if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
-               read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= 
FF_ER_EXPLODE){
+               read_braindead_odml_indx(s, 0) < 0 && (s->err_recognition & 
AV_EF_EXPLODE)){
                 goto fail;
             }
             avio_seek(pb, i+size, SEEK_SET);
@@ -705,7 +705,7 @@ static int avi_read_header(AVFormatContext *s, 
AVFormatParameters *ap)
             if(size > 1000000){
                 av_log(s, AV_LOG_ERROR, "Something went wrong during header 
parsing, "
                                         "I will ignore it and try to continue 
anyway.\n");
-                if (s->error_recognition >= FF_ER_EXPLODE) goto fail;
+                if (s->err_recognition & AV_EF_EXPLODE) goto fail;
                 avi->movi_list = avio_tell(pb) - 4;
                 avi->movi_end  = avio_size(pb);
                 goto end_of_header;
diff --git a/libavformat/options.c b/libavformat/options.c
index a9e2c1c..0b6041b 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -109,10 +109,12 @@ static const AVOption options[]={
 {"fdebug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, 
{.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"},
 {"ts", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, 
E|D, "fdebug"},
 {"max_delay", "maximum muxing or demuxing delay in microseconds", 
OFFSET(max_delay), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D},
-{"fer", "set error detection aggressivity", OFFSET(error_recognition), 
AV_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
-{"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, 
INT_MAX, D, "fer"},
-{"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl 
= FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"},
 {"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), 
AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D},
+{"f_err_detect", "set error detection flags", OFFSET(err_recognition), 
AV_OPT_TYPE_FLAGS, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, 
"f_err_detect"},
+{"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.dbl = 
AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "f_err_detect"},
+{"bitstream", "detect bitstream specification deviations", 0, 
AV_OPT_TYPE_CONST, {.dbl = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, D, 
"f_err_detect"},
+{"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.dbl = 
AV_EF_BUFFER }, INT_MIN, INT_MAX, D, "f_err_detect"},
+{"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, 
{.dbl = AV_EF_EXPLODE }, INT_MIN, INT_MAX, D, "f_err_detect"},
 {NULL},
 };
 
-- 
1.7.2.5

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to