diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 0b963e4106..46c172ad48 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -677,8 +677,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)