avfilter/vf_reverse: check also pts_size when reallocating
Fixes crash of x32. Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
cb59d29fd6
commit
625bf6a55c
@ -72,15 +72,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
|
|||||||
{
|
{
|
||||||
AVFilterContext *ctx = inlink->dst;
|
AVFilterContext *ctx = inlink->dst;
|
||||||
ReverseContext *s = ctx->priv;
|
ReverseContext *s = ctx->priv;
|
||||||
|
void *ptr;
|
||||||
|
|
||||||
if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) {
|
if (s->nb_frames + 1 > s->pts_size / sizeof(*(s->pts))) {
|
||||||
void *ptr;
|
|
||||||
|
|
||||||
ptr = av_fast_realloc(s->pts, &s->pts_size, s->pts_size * 2);
|
ptr = av_fast_realloc(s->pts, &s->pts_size, s->pts_size * 2);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
s->pts = ptr;
|
s->pts = ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) {
|
||||||
ptr = av_fast_realloc(s->frames, &s->frames_size, s->frames_size * 2);
|
ptr = av_fast_realloc(s->frames, &s->frames_size, s->frames_size * 2);
|
||||||
if (!ptr)
|
if (!ptr)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user