diff mbox series

[FFmpeg-devel] avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1

Message ID 66fcab6e.16d4c35a.bm000@oddnet.de
State New
Headers show
Series [FFmpeg-devel] avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1 | expand

Checks

Context Check Description
yinshiyou/make_fate_loongarch64 success Make fate finished
yinshiyou/make_loongarch64 warning New warnings during build
andriy/make_fate_x86 success Make fate finished
andriy/make_x86 warning New warnings during build

Commit Message

Ingo Brückl Oct. 2, 2024, 2:07 a.m. UTC
Sorry for the previous post.

FFmpeg 7.1 as well as the latest development branch do not compile:

  In function 'vaapi_encode_h264_init_picture_params':
  libavcodec/vaapi_encode_h264.c:470:9: error: 'ctx' undeclared
diff mbox series

Patch

From 8e7d30b20d7ef62c4e637d650507672fc10bc5b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@oddnet.de>
Date: Wed, 2 Oct 2024 03:25:37 +0200
Subject: [PATCH] avcodec/vaapi_encode: fix compilation without CONFIG_VAAPI_1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This adds VAAPIEncodeContext *ctx that has been removed
in aa82340b0ccdde4955fba41b8de5e45348ecd11d.

Signed-off-by: Ingo Brückl <ib@oddnet.de>
---
 libavcodec/vaapi_encode_h264.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/vaapi_encode_h264.c b/libavcodec/vaapi_encode_h264.c
index fb87b68bec..cb0a7bd7ef 100644
--- a/libavcodec/vaapi_encode_h264.c
+++ b/libavcodec/vaapi_encode_h264.c
@@ -406,6 +406,7 @@  static int vaapi_encode_h264_init_picture_params(AVCodecContext *avctx,
                                                  FFHWBaseEncodePicture *pic)
 {
     FFHWBaseEncodeContext       *base_ctx = avctx->priv_data;
+    VAAPIEncodeContext               *ctx = avctx->priv_data;
     VAAPIEncodeH264Context          *priv = avctx->priv_data;
     VAAPIEncodePicture         *vaapi_pic = pic->priv;
     VAAPIEncodeH264Picture          *hpic = pic->codec_priv;
-- 
2.30.2