mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-13 10:44:59 +00:00
vf_colorspace: Check av_frame_copy_props() return value
This function can potentially allocate memory. Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c75273310c
commit
6648da3591
@ -861,7 +861,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
|
|||||||
av_frame_free(&in);
|
av_frame_free(&in);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
av_frame_copy_props(out, in);
|
res = av_frame_copy_props(out, in);
|
||||||
|
if (res < 0) {
|
||||||
|
av_frame_free(&in);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
out->color_primaries = s->user_prm == AVCOL_PRI_UNSPECIFIED ?
|
out->color_primaries = s->user_prm == AVCOL_PRI_UNSPECIFIED ?
|
||||||
default_prm[FFMIN(s->user_all, CS_NB)] : s->user_prm;
|
default_prm[FFMIN(s->user_all, CS_NB)] : s->user_prm;
|
||||||
|
Loading…
Reference in New Issue
Block a user