av_buffer_pool_uninit(&dav1d->pool);
// Use twice the amount of required padding bytes for aligned_ptr below.
dav1d->pool = av_buffer_pool_init(ret + DAV1D_PICTURE_ALIGNMENT * 2, NULL);
- if (!dav1d->pool)
+ if (!dav1d->pool) {
+ dav1d->pool_size = 0;
return AVERROR(ENOMEM);
+ }
dav1d->pool_size = ret;
}
buf = av_buffer_pool_get(dav1d->pool);