aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-21 05:47:37 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-21 05:47:37 +0200
commitf8237ca5ae1c6a252764a8c459d7bbd6f66cda4b (patch)
tree649d253ccbdf1be0afea19ee470b90378c81299a /src/main.cpp
parentf8101612035eee8a0772cadffb38b04138a71c28 (diff)
Fix build on older ffmpeg (17+ months old), see ffmpeg commit ef6a9e5e311f09fa8032974fa4d0c1e166a959bb
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
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,