aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDustin Brody <libav@parsoma.net>2011-10-22 08:44:15 -0400
committerAnton Khirnov <anton@khirnov.net>2011-10-22 14:49:22 +0200
commit5ea0001f9eadcbe2ab4ff934c788db04d9704e30 (patch)
treed71e07845894d274e509a9f1dcfdd75ee21fbcde
parentc8dad9a6942dfc4b177cfda751340f29177a91de (diff)
downloadffmpeg-5ea0001f9eadcbe2ab4ff934c788db04d9704e30.tar.gz
lavc: translate non-flag-based er options into flag-based ef options at codec open
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3e4926273f..35c9eebc3a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -576,6 +576,16 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
goto free_and_end;
}
avctx->frame_number = 0;
+#if FF_API_ER
+
+ av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition separate: %d; %d\n",
+ avctx->error_recognition, avctx->err_recognition);
+ /* 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;
+ av_log(avctx, AV_LOG_DEBUG, "err{or,}_recognition combined: %d; %d\n",
+ avctx->error_recognition, avctx->err_recognition);
+#endif
if (HAVE_THREADS && !avctx->thread_opaque) {
ret = ff_thread_init(avctx);