Skip to content

Commit

Permalink
Fix for avio_alloc_context on FFmpeg 7
Browse files Browse the repository at this point in the history
  • Loading branch information
h4tr3d committed Apr 18, 2024
1 parent 37c97b8 commit 70d42fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/formatcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ int custom_io_read(void *opaque, uint8_t *buf, int buf_size)
return io->read(buf, buf_size);
}

#if (LIBAVFORMAT_VERSION_MAJOR < 61)
int custom_io_write(void *opaque, uint8_t *buf, int buf_size)
#else
int custom_io_write(void *opaque, const uint8_t *buf, int buf_size)
#endif
{
if (!opaque)
return -1;
Expand Down

0 comments on commit 70d42fd

Please sign in to comment.