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>
pull/360/head
Andreas Rheinhardt 3 years ago
parent 046cbd255e
commit c4042fc1e3
  1. 5
      libavfilter/vf_shufflepixels.c

@ -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);

Loading…
Cancel
Save