Skip to content

Commit 00d7b56

Browse files
jfrancis71bjsowa
andauthored
Fix build with the current FFmpeg avformat (#190)
* signature for function libavformat/avio.h avio_alloc_context, parameter write_packet has changed from (void *opaque, uint8_t *buf, int buf_size) to (void *opaque, const uint8_t *buf, int buf_size) This was previously deprecated, but removed on March 07, 2024. Please see FFmpeg/FFmpeg@02aea61 for details. This commit reflects that change. * Update src/libav_streamer.cpp --------- Co-authored-by: Błażej Sowa <[email protected]>
1 parent 8c3e5f4 commit 00d7b56

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libav_streamer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ LibavStreamer::~LibavStreamer()
7777
}
7878

7979
// output callback for ffmpeg IO context
80+
#if LIBAVFORMAT_VERSION_MAJOR < 61
8081
static int dispatch_output_packet(void * opaque, uint8_t * buffer, int buffer_size)
82+
#else
83+
static int dispatch_output_packet(void * opaque, const uint8_t * buffer, int buffer_size)
84+
#endif
8185
{
8286
async_web_server_cpp::HttpConnectionPtr connection =
8387
*((async_web_server_cpp::HttpConnectionPtr *) opaque);

0 commit comments

Comments
 (0)