mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
(Scaler) Try to prevent calling NULL function pointer
This commit is contained in:
parent
d6c53f3fa8
commit
2d35ab7fe1
@ -348,11 +348,11 @@ static void *v4l_init(const char *device, uint64_t caps,
|
||||
goto error;
|
||||
}
|
||||
|
||||
v4l->scaler.in_width = v4l->scaler.out_width = v4l->width;
|
||||
v4l->scaler.in_height = v4l->scaler.out_height = v4l->height;
|
||||
v4l->scaler.in_fmt = SCALER_FMT_YUYV;
|
||||
v4l->scaler.out_fmt = SCALER_FMT_ARGB8888;
|
||||
v4l->scaler.in_stride = v4l->pitch;
|
||||
v4l->scaler.in_width = v4l->scaler.out_width = v4l->width;
|
||||
v4l->scaler.in_height = v4l->scaler.out_height = v4l->height;
|
||||
v4l->scaler.in_fmt = SCALER_FMT_YUYV;
|
||||
v4l->scaler.out_fmt = SCALER_FMT_ARGB8888;
|
||||
v4l->scaler.in_stride = v4l->pitch;
|
||||
v4l->scaler.out_stride = v4l->width * 4;
|
||||
|
||||
if (!scaler_ctx_gen_filter(&v4l->scaler))
|
||||
|
@ -315,8 +315,10 @@ void scaler_ctx_scale(struct scaler_ctx *ctx,
|
||||
else
|
||||
{
|
||||
/* Take generic filter path. */
|
||||
ctx->scaler_horiz(ctx, input_frame, input_stride);
|
||||
ctx->scaler_vert (ctx, output, output_stride);
|
||||
if (ctx->scaler_horiz)
|
||||
ctx->scaler_horiz(ctx, input_frame, input_stride);
|
||||
if (ctx->scaler_vert)
|
||||
ctx->scaler_vert (ctx, output, output_stride);
|
||||
}
|
||||
|
||||
if (ctx->out_fmt != SCALER_FMT_ARGB8888)
|
||||
@ -324,4 +326,3 @@ void scaler_ctx_scale(struct scaler_ctx *ctx,
|
||||
ctx->out_width, ctx->out_height,
|
||||
ctx->out_stride, ctx->output.stride);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user