PR #24362 opened by akashskypatel
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24362
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24362.patch

fftools/ffmpeg_filter: fix signedness of sub2video destination pointer


# Summary of changes


AVFrame.data is uint8_t * and sub2video_copy_rect() expects a uint8_t * 
destination. Use the matching type for the intermediate pointer, avoiding 
pointer-sign warnings without changing behavior.

Current
```
AVFrame::data[0]          // uint8_t *
        |
int8_t *dst;                       // should be uint8_t *
        |
sub2video_copy_rect(...)  // expects uint8_t *
```

Proposed:
```
AVFrame::data[0]          // uint8_t *
        |
uint8_t *dst;                       // should be uint8_t *
        |
sub2video_copy_rect(...)  // expects uint8_t *
```

<!--
If this PR requires new FATE test samples, attach them to the PR and
list their target paths below (relative to the fate-suite root).

Attached filenames must match the sample's filename:

```fate-samples
# e.g. vorbis/new-sample.ogg
```
-->



>From 5d9895ecea048a7900b8e0cdf63687d254a1445b Mon Sep 17 00:00:00 2001
From: akashskypatel <[email protected]>
Date: Thu, 3 Sep 2026 23:42:12 +0000
Subject: [PATCH] fftools/ffmpeg_filter: pointer-sign warnings in
 sub2video_update()

fftools/ffmpeg_filter: fix signedness of sub2video destination pointer

AVFrame.data is uint8_t * and sub2video_copy_rect() expects a
uint8_t * destination. Use the matching type for the intermediate
pointer, avoiding pointer-sign warnings without changing behavior.
---
 fftools/ffmpeg_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 114a694c0c..058d64421d 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -356,7 +356,7 @@ static void sub2video_update(InputFilterPriv *ifp, int64_t 
heartbeat_pts,
                              const AVSubtitle *sub)
 {
     AVFrame *frame = ifp->sub2video.frame;
-    int8_t *dst;
+    uint8_t *dst;
     int     dst_linesize;
     int num_rects;
     int64_t pts, end_pts;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to