indeo: clear allocated band buffers

(cherry picked from commit 23ba1503f2)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
Kostya Shishkov
2012-05-19 13:39:15 +02:00
committed by Reinhard Tartler
parent c0df6a24ce
commit 601fa56582

View File

@ -212,14 +212,14 @@ int av_cold ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg)
band->width = b_width; band->width = b_width;
band->height = b_height; band->height = b_height;
band->pitch = width_aligned; band->pitch = width_aligned;
band->bufs[0] = av_malloc(buf_size); band->bufs[0] = av_mallocz(buf_size);
band->bufs[1] = av_malloc(buf_size); band->bufs[1] = av_mallocz(buf_size);
if (!band->bufs[0] || !band->bufs[1]) if (!band->bufs[0] || !band->bufs[1])
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
/* allocate the 3rd band buffer for scalability mode */ /* allocate the 3rd band buffer for scalability mode */
if (cfg->luma_bands > 1) { if (cfg->luma_bands > 1) {
band->bufs[2] = av_malloc(buf_size); band->bufs[2] = av_mallocz(buf_size);
if (!band->bufs[2]) if (!band->bufs[2])
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
} }