1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-28 12:16:12 +02:00

avcodec/hevc: calculate checksum only if AV_EF_EXPLODE is set

This avoids a slowdown with the default of enabled CRC checks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-10-27 22:22:23 +01:00
parent 69d39cb90c
commit 758b6d39f6

View File

@ -2504,9 +2504,10 @@ static int hevc_decode_frame(AVCodecContext *avctx, void *data, int *got_output,
/* verify the SEI checksum */
if (avctx->err_recognition & AV_EF_CRCCHECK && s->is_decoded &&
avctx->err_recognition & AV_EF_EXPLODE &&
s->is_md5) {
ret = verify_md5(s, s->ref->frame);
if (ret < 0 && avctx->err_recognition & AV_EF_EXPLODE) {
if (ret < 0) {
ff_hevc_unref_frame(s, s->ref, ~0);
return ret;
}