Browse Source

lavc: translate non-flag-based er options into flag-based ef options at codec open

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n0.9
Dustin Brody Anton Khirnov 14 years ago
parent
commit
5ea0001f9e
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavcodec/utils.c

+ 10
- 0
libavcodec/utils.c View File

@@ -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);


Loading…
Cancel
Save