fs->sample_buffer = av_malloc_array((fs->width + 6), 3 * MAX_PLANES *
sizeof(*fs->sample_buffer));
- if (!fs->sample_buffer) {
+ fs->sample_buffer32 = av_malloc_array((fs->width + 6), 3 * MAX_PLANES *
+ sizeof(*fs->sample_buffer32));
+ if (!fs->sample_buffer || !fs->sample_buffer32) {
+ av_freep(&fs->sample_buffer);
+ av_freep(&fs->sample_buffer32);
av_freep(&f->slice_context[i]);
goto memfail;
}
memfail:
while(--i >= 0) {
av_freep(&f->slice_context[i]->sample_buffer);
+ av_freep(&f->slice_context[i]->sample_buffer32);
av_freep(&f->slice_context[i]);
}
return AVERROR(ENOMEM);
av_freep(&p->vlc_state);
}
av_freep(&fs->sample_buffer);
+ av_freep(&fs->sample_buffer32);
}
av_freep(&avctx->stats_out);