mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
vo_opengl: hwdec_vaegl: fix potentially undefined memory access
This commit is contained in:
parent
9a45932984
commit
3e474f4654
@ -428,12 +428,12 @@ static void determine_working_formats(struct gl_hwdec *hw)
|
|||||||
}
|
}
|
||||||
for (int n = 0; fc->valid_sw_formats[n] != AV_PIX_FMT_NONE; n++) {
|
for (int n = 0; fc->valid_sw_formats[n] != AV_PIX_FMT_NONE; n++) {
|
||||||
AVBufferRef *fref = NULL;
|
AVBufferRef *fref = NULL;
|
||||||
|
struct mp_image *s = NULL;
|
||||||
|
AVFrame *frame = NULL;
|
||||||
fref = av_hwframe_ctx_alloc(p->ctx->av_device_ref);
|
fref = av_hwframe_ctx_alloc(p->ctx->av_device_ref);
|
||||||
if (!fref)
|
if (!fref)
|
||||||
goto err;
|
goto err;
|
||||||
AVHWFramesContext *fctx = (void *)fref->data;
|
AVHWFramesContext *fctx = (void *)fref->data;
|
||||||
struct mp_image *s = NULL;
|
|
||||||
AVFrame *frame = NULL;
|
|
||||||
fctx->format = AV_PIX_FMT_VAAPI;
|
fctx->format = AV_PIX_FMT_VAAPI;
|
||||||
fctx->sw_format = fc->valid_sw_formats[n];
|
fctx->sw_format = fc->valid_sw_formats[n];
|
||||||
fctx->width = 128;
|
fctx->width = 128;
|
||||||
|
Loading…
Reference in New Issue
Block a user