Skip to content

Commit 16e715e

Browse files
committed
ffmpeg: fix compilation before debian:trixie
1 parent 14657e2 commit 16e715e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

util/ffmpeg/remuxer.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
static AVRational time_base = {1, 1000LL * 1000LL};
88
static unsigned avio_ctx_buffer_size = 4096;
99

10+
#if FF_API_AVIO_WRITE_NONCONST
11+
typedef int (*ffmpeg_write_nonconst_packet)(void *opaque, uint8_t *buf, int buf_size);
12+
#else // FF_API_AVIO_WRITE_NONCONST
13+
#define ffmpeg_write_nonconst_packet ffmpeg_write_packet
14+
#endif // FF_API_AVIO_WRITE_NONCONST
15+
1016
static int ffmpeg_remuxer_init_avcontext(AVFormatContext **context, ffmpeg_remuxer_t *remuxer, int output, ffmpeg_write_packet packet_out, ffmpeg_read_packet packet_in)
1117
{
1218
uint8_t *buffer = NULL;
@@ -20,7 +26,7 @@ static int ffmpeg_remuxer_init_avcontext(AVFormatContext **context, ffmpeg_remux
2026
buffer = av_malloc(buffer_size);
2127
if (!buffer)
2228
return AVERROR(ENOMEM);
23-
avio = avio_alloc_context(buffer, buffer_size, output, remuxer->opaque, packet_in, packet_out, NULL);
29+
avio = avio_alloc_context(buffer, buffer_size, output, remuxer->opaque, packet_in, (ffmpeg_write_nonconst_packet)packet_out, NULL);
2430
if (!avio)
2531
goto error;
2632
if (output && (ret = avformat_alloc_output_context2(context, NULL, remuxer->video_format, NULL)) < 0)

0 commit comments

Comments
 (0)