[FFmpeg-cvslog] avcodec/hevc: calculate checksum only if AV_EF_EXPLODE is set

Michael Niedermayer git at videolan.org
Sun Oct 27 22:36:33 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 27 22:22:23 2013 +0100| [758b6d39f685a510f48ff9e4c05fffa859d23c42] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=758b6d39f685a510f48ff9e4c05fffa859d23c42
---

 libavcodec/hevc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
index 47f3a09..6e9c2ea 100644
--- a/libavcodec/hevc.c
+++ b/libavcodec/hevc.c
@@ -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;
         }



More information about the ffmpeg-cvslog mailing list