[vlc-commits] avcodec: vaapi: fix vlc_va_sys_t not set early enough
Thomas Guillem
git at videolan.org
Fri Oct 25 10:00:58 CEST 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Oct 25 09:59:22 2019 +0200| [fb66726dee4fb94c9e8e63f9d3d94e0c9e1cacef] | committer: Steve Lhomme
avcodec: vaapi: fix vlc_va_sys_t not set early enough
It's needed by the va_surface callbacks.
+ remove unused variable
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fb66726dee4fb94c9e8e63f9d3d94e0c9e1cacef
---
modules/codec/avcodec/vaapi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index c0049c814e..8da4179a4c 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -176,7 +176,6 @@ static int Get(vlc_va_t *va, picture_t *pic, uint8_t **data)
static void Delete(vlc_va_t *va)
{
vlc_va_sys_t *sys = va->sys;
- vlc_object_t *o = VLC_OBJECT(va);
vlc_video_context_Release(sys->vctx);
va_pool_Close(sys->va_pool);
@@ -267,6 +266,7 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
sys->hw_ctx.display = va_dpy;
sys->hw_ctx.config_id = VA_INVALID_ID;
sys->hw_ctx.context_id = VA_INVALID_ID;
+ va->sys = sys;
video_format_t fmt_video = fmt->video;
fmt_video.i_chroma = i_vlc_chroma;
@@ -308,7 +308,6 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, const AVPixFmtDescriptor *d
if (sys->vctx == NULL)
goto error;
- va->sys = sys;
va->ops = &ops;
*vtcx_out = sys->vctx;
return VLC_SUCCESS;
More information about the vlc-commits
mailing list