[FFmpeg-devel] [PATCH] avcodec/vp9: Use separate memset for counts.eob

Michael Niedermayer michaelni at gmx.at
Fri May 15 11:10:10 CEST 2015


Makes no real difference, but maybe scares coverity less (CID1297578)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/vp9.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index db3f541..4655e9a 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -867,7 +867,8 @@ static int decode_frame_header(AVCodecContext *ctx,
     }
 
     if (s->keyframe || s->intraonly) {
-        memset(s->counts.coef, 0, sizeof(s->counts.coef) + sizeof(s->counts.eob));
+        memset(s->counts.coef, 0, sizeof(s->counts.coef));
+        memset(s->counts.eob,  0, sizeof(s->counts.eob));
     } else {
         memset(&s->counts, 0, sizeof(s->counts));
     }
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list