diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 95ceca639f..5dd187d2b5 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -713,8 +713,8 @@ static int decode_init_thread_copy(AVCodecContext *avctx) if (!avctx->internal->is_copy) return 0; - memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); - memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); + + memset(h, 0, sizeof(*h)); ret = h264_init_context(avctx, h); if (ret < 0)