[FFmpeg-devel] [PATCH 3/8] avcodec/hevc: cleanup when to run the checksum and what to do with it
Michael Niedermayer
michaelni at gmx.at
Mon Oct 28 16:54:38 CET 2013
if AV_EF_CRCCHECK is set the check is run and the results printed
if AV_EF_EXPLODE and AV_EF_CRCCHECK is set a check failure causes the decoder to return an error
if AV_EF_COMPLIANT is set a check failure causes the decoder to return an error
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/hevc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index aaf319f..e3e81ea 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -2531,11 +2531,10 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
return ret;
/* verify the SEI checksum */
- if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded &&
- avctx->err_recognition & AV_EF_EXPLODE &&
+ if (avctx->err_recognition & (AV_EF_CRCCHECK | AV_EF_COMPLIANT) && s->is_decoded &&
s->is_md5) {
ret = verify_md5(s, s->ref->frame);
- if (ret < 0) {
+ if (ret < 0 && avctx->err_recognition & (AV_EF_EXPLODE | AV_EF_COMPLIANT)) {
ff_hevc_unref_frame(s, s->ref, ~0);
return ret;
}
--
1.7.9.5
More information about the ffmpeg-devel
mailing list