[FFmpeg-cvslog] lavc: Add AV_EF flags to restore support for the error_resilience framework in the new API .

Michael Niedermayer git at videolan.org
Sat Nov 19 04:17:27 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Nov 19 02:45:16 2011 +0100| [02bd11e9696460d5c535a32ed132cd6f518d39d6] | committer: Michael Niedermayer

lavc: Add AV_EF flags to restore support for the error_resilience framework in the new API.
The existing flags prior to this have a semantically different meaning and cannot be
used.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02bd11e9696460d5c535a32ed132cd6f518d39d6
---

 libavcodec/avcodec.h |    4 ++++
 libavcodec/utils.c   |    7 +++++++
 libavcodec/version.h |    2 +-
 3 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index d62cbfb..41faaa2 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3009,6 +3009,10 @@ typedef struct AVCodecContext {
 #define AV_EF_BUFFER    (1<<2)
 #define AV_EF_EXPLODE   (1<<3)
 
+#define AV_EF_CAREFUL    (1<<16)
+#define AV_EF_COMPLIANT  (1<<17)
+#define AV_EF_AGGRESSIVE (1<<18)
+
     /**
      * Current statistics for PTS correction.
      * - decoding: maintained and used by libavcodec, not intended to be used by user apps
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 9c0269b..ba85129 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -619,6 +619,13 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
     /* FF_ER_CAREFUL (==1) implies AV_EF_CRCCHECK (== 1<<1 - 1),
        FF_ER_COMPLIANT (==2) implies AV_EF_{CRCCHECK,BITSTREAM} (== 1<<2 - 1), et cetera} */
     avctx->err_recognition |= (1<<(avctx->error_recognition-(avctx->error_recognition>=FF_ER_VERY_AGGRESSIVE))) - 1;
+    switch(avctx->error_recognition){
+        case FF_ER_VERY_AGGRESSIVE:
+        case FF_ER_AGGRESSIVE     : avctx->err_recognition |= AV_EF_AGGRESSIVE;
+        case FF_ER_COMPLIANT      : avctx->err_recognition |= AV_EF_COMPLIANT;
+        case FF_ER_CAREFUL        : avctx->err_recognition |= AV_EF_CAREFUL;
+    }
+
     av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition combined: %d; %d\n",
            avctx->error_recognition, avctx->err_recognition);
 #endif
diff --git a/libavcodec/version.h b/libavcodec/version.h
index cdc983f..482fa09 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -22,7 +22,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR 53
 #define LIBAVCODEC_VERSION_MINOR 35
-#define LIBAVCODEC_VERSION_MICRO  0
+#define LIBAVCODEC_VERSION_MICRO  1
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list