diff options
author | James Almer <jamrial@gmail.com> | 2017-10-31 12:48:36 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-10-31 12:48:36 -0300 |
commit | b1ab02895b121b92dc3483c79e45eb5ea686f3aa (patch) | |
tree | ebe6ebff88f8a4cce653cce696868fc9a6b6965b /libavcodec/hevcdec.c | |
parent | 9e2b0f32e905cc51d5e559aa4f80970e55438049 (diff) | |
parent | c3f0357bdf7d3c542aad2c58b94184b9f56edc41 (diff) | |
download | ffmpeg-b1ab02895b121b92dc3483c79e45eb5ea686f3aa.tar.gz |
Merge commit 'c3f0357bdf7d3c542aad2c58b94184b9f56edc41'
* commit 'c3f0357bdf7d3c542aad2c58b94184b9f56edc41':
hevcdec: move the MD5 context out of HEVCSEIPictureHash back into HEVCContext
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/hevcdec.c')
-rw-r--r-- | libavcodec/hevcdec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 2e4add2ae3..675025b211 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -3035,7 +3035,7 @@ static int verify_md5(HEVCContext *s, AVFrame *frame) int h = (i == 1 || i == 2) ? (height >> desc->log2_chroma_h) : height; uint8_t md5[16]; - av_md5_init(s->sei.picture_hash.md5_ctx); + av_md5_init(s->md5_ctx); for (j = 0; j < h; j++) { const uint8_t *src = frame->data[i] + j * frame->linesize[i]; #if HAVE_BIGENDIAN @@ -3045,9 +3045,9 @@ static int verify_md5(HEVCContext *s, AVFrame *frame) src = s->checksum_buf; } #endif - av_md5_update(s->sei.picture_hash.md5_ctx, src, w << pixel_shift); + av_md5_update(s->md5_ctx, src, w << pixel_shift); } - av_md5_final(s->sei.picture_hash.md5_ctx, md5); + av_md5_final(s->md5_ctx, md5); if (!memcmp(md5, s->sei.picture_hash.md5[i], 16)) { av_log (s->avctx, AV_LOG_DEBUG, "plane %d - correct ", i); @@ -3200,7 +3200,7 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx) pic_arrays_free(s); - av_freep(&s->sei.picture_hash.md5_ctx); + av_freep(&s->md5_ctx); av_freep(&s->cabac_state); @@ -3275,8 +3275,8 @@ static av_cold int hevc_init_context(AVCodecContext *avctx) s->max_ra = INT_MAX; - s->sei.picture_hash.md5_ctx = av_md5_alloc(); - if (!s->sei.picture_hash.md5_ctx) + s->md5_ctx = av_md5_alloc(); + if (!s->md5_ctx) goto fail; ff_bswapdsp_init(&s->bdsp); |