1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/vf_shufflepixels: Check ff_get_video_buffer()

There would be a segfault in case of (likely memory allocation) failure.
Fixes Coverity issue #1322338.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-07-22 09:24:20 +02:00
parent 046cbd255e
commit c4042fc1e3

View File

@ -377,6 +377,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
ThreadData td;
int ret;
if (!out) {
ret = AVERROR(ENOMEM);
goto fail;
}
ret = av_frame_copy_props(out, in);
if (ret < 0) {
av_frame_free(&out);