Skip to content

Commit 70d42fd

Browse files
committed
Fix for avio_alloc_context on FFmpeg 7
1 parent 37c97b8 commit 70d42fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/formatcontext.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ int custom_io_read(void *opaque, uint8_t *buf, int buf_size)
2121
return io->read(buf, buf_size);
2222
}
2323

24+
#if (LIBAVFORMAT_VERSION_MAJOR < 61)
2425
int custom_io_write(void *opaque, uint8_t *buf, int buf_size)
26+
#else
27+
int custom_io_write(void *opaque, const uint8_t *buf, int buf_size)
28+
#endif
2529
{
2630
if (!opaque)
2731
return -1;

0 commit comments

Comments
 (0)