Mercurial > mplayer.hg
changeset 34546:123345d17f3a
Translate level-based to flag-based error recognition values.
author | reimar |
---|---|
date | Sat, 28 Jan 2012 13:59:17 +0000 |
parents | d1f195e84b9e |
children | 3bc6555139cd |
files | libmpcodecs/vd_ffmpeg.c |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c Sat Jan 28 13:51:57 2012 +0000 +++ b/libmpcodecs/vd_ffmpeg.c Sat Jan 28 13:59:17 2012 +0000 @@ -266,7 +266,20 @@ avctx->coded_width = sh->disp_w; avctx->coded_height= sh->disp_h; avctx->workaround_bugs= lavc_param_workaround_bugs; - avctx->error_recognition= lavc_param_error_resilience; + switch (lavc_param_error_resilience) { + case 5: + avctx->err_recognition |= AV_EF_EXPLODE | AV_EF_COMPLIANT | AV_EF_CAREFUL; + break; + case 4: + case 3: + avctx->err_recognition |= AV_EF_AGGRESSIVE; + // Fallthrough + case 2: + avctx->err_recognition |= AV_EF_COMPLIANT; + // Fallthrough + case 1: + avctx->err_recognition |= AV_EF_CAREFUL; + } lavc_param_gray|= CODEC_FLAG_GRAY; #ifdef CODEC_FLAG2_SHOW_ALL if(!lavc_param_wait_keyframe) avctx->flags2 |= CODEC_FLAG2_SHOW_ALL;