diff --git a/src/hwaccel_rpi4.h b/src/hwaccel_rpi4.h index 5f024cdc0..b3fba5171 100644 --- a/src/hwaccel_rpi4.h +++ b/src/hwaccel_rpi4.h @@ -59,27 +59,6 @@ typedef struct av_frame_wrapper{ struct AVFrame *av_frame; } av_frame_wrapper; -#ifdef HAVE_LAVC - -#include "libavcodec_common.h" - -static inline void av_frame_wrapper_recycle(struct video_frame *f){ - for(unsigned i = 0; i < f->tile_count; i++){ - av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data; - - av_frame_unref(wrapper->av_frame); - } -} - -static inline void av_frame_wrapper_copy(struct video_frame *f){ - for(unsigned i = 0; i < f->tile_count; i++){ - av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data; - - wrapper->av_frame = av_frame_clone(wrapper->av_frame); - } -} -#endif // HAVE_LAVC - #ifdef __cplusplus } #endif diff --git a/src/video_display/rpi4_out.cpp b/src/video_display/rpi4_out.cpp index dac8aeb7e..82e7f5d86 100644 --- a/src/video_display/rpi4_out.cpp +++ b/src/video_display/rpi4_out.cpp @@ -443,6 +443,22 @@ static void frame_data_deleter(struct video_frame *buf){ delete wrapper; } +static inline void av_frame_wrapper_recycle(struct video_frame *f){ + for(unsigned i = 0; i < f->tile_count; i++){ + av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data; + + av_frame_unref(wrapper->av_frame); + } +} + +static inline void av_frame_wrapper_copy(struct video_frame *f){ + for(unsigned i = 0; i < f->tile_count; i++){ + av_frame_wrapper *wrapper = (av_frame_wrapper *)(void *) f->tiles[i].data; + + wrapper->av_frame = av_frame_clone(wrapper->av_frame); + } +} + static struct video_frame *alloc_new_frame(rpi4_display_state *s){ auto new_frame = vf_alloc_desc(s->current_desc);