History

avfilter/vf_tonemap_opencl: Dereference after NULL check

Fixes: CID1437472 Dereference before null check

Michael Niedermayer committed 2 years ago

Commit e5c0f561 parent 22ee55a1 file · +2 −2Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_tonemap_opencl.c+2−2
@@ -343,8 +343,7 @@ static int tonemap_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) · 342 unmodified lines
343 int err;343 int err;
344 double peak = ctx->peak;344 double peak = ctx->peak;
345 345
346 AVHWFramesContext *input_frames_ctx =346 AVHWFramesContext *input_frames_ctx;
347 (AVHWFramesContext*)input->hw_frames_ctx->data;
348 347
349 av_log(ctx, AV_LOG_DEBUG, "Filter input: %s, %ux%u (%"PRId64").\n",348 av_log(ctx, AV_LOG_DEBUG, "Filter input: %s, %ux%u (%"PRId64").\n",
350 av_get_pix_fmt_name(input->format),349 av_get_pix_fmt_name(input->format),
@@ -352,6 +351,7 @@ static int tonemap_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) · 1 unmodified line
352 351
353 if (!input->hw_frames_ctx)352 if (!input->hw_frames_ctx)
354 return AVERROR(EINVAL);353 return AVERROR(EINVAL);
354 input_frames_ctx = (AVHWFramesContext*)input->hw_frames_ctx->data;
355 355
356 output = ff_get_video_buffer(outlink, outlink->w, outlink->h);356 output = ff_get_video_buffer(outlink, outlink->w, outlink->h);
357 if (!output) {357 if (!output) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t