summaryrefslogtreecommitdiff
path: root/libavcodec/indeo3.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2012-05-14 19:33:03 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2012-05-15 19:05:39 +0200
commit81064a8045028838fd32d18490034c207c8ecc06 (patch)
tree56cb391765bf643d17e2f793efdbd49211c5418b /libavcodec/indeo3.c
parentfc417db3f162d5269c0d22f8e467da4afa67c20a (diff)
indeo3: initialise pixel planes on allocation
This prevents decoder from reading garbage from it in case of errors later.
Diffstat (limited to 'libavcodec/indeo3.c')
-rw-r--r--libavcodec/indeo3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 0856d0607c..1221ffab18 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -194,6 +194,8 @@ static av_cold int allocate_frame_buffers(Indeo3DecodeContext *ctx,
/* set buffer pointers = buf_ptr + pitch and thus skip the INTRA prediction line */
ctx->planes[p].pixels[0] = ctx->planes[p].buffers[0] + ctx->planes[p].pitch;
ctx->planes[p].pixels[1] = ctx->planes[p].buffers[1] + ctx->planes[p].pitch;
+ memset(ctx->planes[p].pixels[0], 0, ctx->planes[p].pitch * ctx->planes[p].height);
+ memset(ctx->planes[p].pixels[1], 0, ctx->planes[p].pitch * ctx->planes[p].height);
}
return 0;