Fix build on older ffmpeg (17+ months old), see ffmpeg commit ef6a9e5e311f09fa8032974fa4d0c1e166a959bb

This commit is contained in:
dec05eba 2022-09-21 05:47:37 +02:00
parent f810161203
commit f8237ca5ae

View File

@ -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,