mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avfilter/vf_spp: Use av_malloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f31fd06713
commit
eb0fc73dcc
@ -270,8 +270,8 @@ static int config_input(AVFilterLink *inlink)
|
|||||||
spp->hsub = desc->log2_chroma_w;
|
spp->hsub = desc->log2_chroma_w;
|
||||||
spp->vsub = desc->log2_chroma_h;
|
spp->vsub = desc->log2_chroma_h;
|
||||||
spp->temp_linesize = FFALIGN(inlink->w + 16, 16);
|
spp->temp_linesize = FFALIGN(inlink->w + 16, 16);
|
||||||
spp->temp = av_malloc(spp->temp_linesize * h * sizeof(*spp->temp));
|
spp->temp = av_malloc_array(spp->temp_linesize, h * sizeof(*spp->temp));
|
||||||
spp->src = av_malloc(spp->temp_linesize * h * sizeof(*spp->src));
|
spp->src = av_malloc_array(spp->temp_linesize, h * sizeof(*spp->src));
|
||||||
if (!spp->use_bframe_qp) {
|
if (!spp->use_bframe_qp) {
|
||||||
/* we are assuming here the qp blocks will not be smaller that 16x16 */
|
/* we are assuming here the qp blocks will not be smaller that 16x16 */
|
||||||
spp->non_b_qp_alloc_size = FF_CEIL_RSHIFT(inlink->w, 4) * FF_CEIL_RSHIFT(inlink->h, 4);
|
spp->non_b_qp_alloc_size = FF_CEIL_RSHIFT(inlink->w, 4) * FF_CEIL_RSHIFT(inlink->h, 4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user