From f8237ca5ae1c6a252764a8c459d7bbd6f66cda4b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Sep 2022 05:47:37 +0200 Subject: Fix build on older ffmpeg (17+ months old), see ffmpeg commit ef6a9e5e311f09fa8032974fa4d0c1e166a959bb --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 1b88cd9..c210fe7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -624,9 +624,15 @@ static AVFrame* open_audio(AVCodecContext *audio_codec_context) { return frame; } +#if FF_API_BUFFER_SIZE_T +static AVBufferRef* dummy_hw_frame_init(int size) { + return av_buffer_alloc(size); +} +#else static AVBufferRef* dummy_hw_frame_init(size_t size) { return av_buffer_alloc(size); } +#endif static void open_video(AVCodecContext *codec_context, WindowPixmap &window_pixmap, AVBufferRef **device_ctx, -- cgit v1.2.3