Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Kacper Michajłow via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: "Kacper Michajłow" <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] avcodec/d3d12va_encode_h264: remove unused variables (PR #20767)
Date: Mon, 27 Oct 2025 14:40:26 -0000
Message-ID: <176157602679.81.2970330197856056394@7d278768979e> (raw)

PR #20767 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20767
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20767.patch


From d57de8335282d99c6544009cacecb91044f8b7ef Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Mon, 27 Oct 2025 15:38:07 +0100
Subject: [PATCH 1/3] avcodec/d3d12va_encode: fix format specifier for HRESULT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavcodec/d3d12va_encode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/d3d12va_encode.c b/libavcodec/d3d12va_encode.c
index 4a8672a359..aa8a5982be 100644
--- a/libavcodec/d3d12va_encode.c
+++ b/libavcodec/d3d12va_encode.c
@@ -1511,7 +1511,7 @@ int ff_d3d12va_encode_init(AVCodecContext *avctx)
     format_info.Format = ((AVD3D12VAFramesContext *)base_ctx->input_frames->hwctx)->format;
     if (FAILED(ID3D12VideoDevice_CheckFeatureSupport(ctx->hwctx->device, D3D12_FEATURE_FORMAT_INFO,
         &format_info, sizeof(format_info)))) {
-        av_log(avctx, AV_LOG_ERROR, "Failed to query format plane count: 0x%x\n", hr);
+        av_log(avctx, AV_LOG_ERROR, "Failed to query format plane count: %#lx\n", hr);
         err = AVERROR_EXTERNAL;
         goto fail;
     }
-- 
2.49.1


From a6ccaa2eea1900676f975c1dd720638ea2ee828d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Mon, 27 Oct 2025 15:38:47 +0100
Subject: [PATCH 2/3] avcodec/d3d12va_encode_h264: remove unused variables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavcodec/d3d12va_encode_h264.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libavcodec/d3d12va_encode_h264.c b/libavcodec/d3d12va_encode_h264.c
index 560187b750..967544ea24 100644
--- a/libavcodec/d3d12va_encode_h264.c
+++ b/libavcodec/d3d12va_encode_h264.c
@@ -167,7 +167,6 @@ static int d3d12va_encode_h264_init_sequence_params(AVCodecContext *avctx)
     AVD3D12VAFramesContext    *hwctx = base_ctx->input_frames->hwctx;
     H264RawSPS                *sps  = &priv->units.raw_sps;
     H264RawPPS                *pps  = &priv->units.raw_pps;
-    H264RawVUI                *vui  = &sps->vui;
     D3D12_VIDEO_ENCODER_PROFILE_H264 profile = D3D12_VIDEO_ENCODER_PROFILE_H264_MAIN;
     D3D12_VIDEO_ENCODER_LEVELS_H264 level = { 0 };
     const AVPixFmtDescriptor *desc;
@@ -341,7 +340,6 @@ static int d3d12va_encode_h264_configure(AVCodecContext *avctx)
 static int d3d12va_encode_h264_set_level(AVCodecContext *avctx)
 {
     D3D12VAEncodeContext        *ctx = avctx->priv_data;
-    D3D12VAEncodeH264Context    *priv = avctx->priv_data;
     int i;
 
     ctx->level.DataSize = sizeof(D3D12_VIDEO_ENCODER_LEVELS_H264);
-- 
2.49.1


From ccb1865a82c7bb1bc75a486bb0423355a2daa522 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <kasper93@gmail.com>
Date: Mon, 27 Oct 2025 15:39:14 +0100
Subject: [PATCH 3/3] avfilter/buffersink: move ret declaration to suppress
 unused warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
---
 libavfilter/buffersink.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 183840a2bd..d9a124b455 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -167,7 +167,6 @@ int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx,
 static av_cold int common_init(AVFilterContext *ctx)
 {
     BufferSinkContext *buf = ctx->priv;
-    int ret = 0;
 
 #if FF_API_BUFFERSINK_OPTS
 
@@ -224,13 +223,11 @@ static av_cold int common_init(AVFilterContext *ctx)
                        sizeof(*buf->channel_layouts) * 2);
                 buf->nb_channel_layouts++;
 
-                ret = av_channel_layout_from_string(&buf->channel_layouts[buf->nb_channel_layouts - 1], cur);
+                int ret = av_channel_layout_from_string(&buf->channel_layouts[buf->nb_channel_layouts - 1], cur);
                 if (ret < 0) {
                     av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout: %s.\n", cur);
                     return ret;
                 }
-                if (ret < 0)
-                    return ret;
 
                 cur = next;
             }
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

                 reply	other threads:[~2025-10-27 14:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=176157602679.81.2970330197856056394@7d278768979e \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git