mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-04-01 04:20:46 +00:00
Fix linux build
This commit is contained in:
parent
44ebc4846b
commit
9eb4eadda6
@ -35,6 +35,12 @@ extern "C" {
|
|||||||
|
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
|
static void free_frame(AVFrame *frame) {
|
||||||
|
av_frame_free(&frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
using frame_t = util::safe_ptr<AVFrame, free_frame>;
|
||||||
|
|
||||||
namespace dyn {
|
namespace dyn {
|
||||||
void *handle(const std::vector<const char *> &libs) {
|
void *handle(const std::vector<const char *> &libs) {
|
||||||
void *handle;
|
void *handle;
|
||||||
@ -929,6 +935,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int set_frame(AVFrame *frame) {
|
int set_frame(AVFrame *frame) {
|
||||||
|
this->hwframe.reset(frame);
|
||||||
this->frame = frame;
|
this->frame = frame;
|
||||||
|
|
||||||
if(av_hwframe_get_buffer(frame->hw_frames_ctx, frame, 0)) {
|
if(av_hwframe_get_buffer(frame->hw_frames_ctx, frame, 0)) {
|
||||||
@ -984,15 +991,14 @@ public:
|
|||||||
if(gl::ctx.GetError) {
|
if(gl::ctx.GetError) {
|
||||||
gl_drain_errors;
|
gl_drain_errors;
|
||||||
}
|
}
|
||||||
if(frame) {
|
|
||||||
av_frame_free(frame);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int in_width, in_height;
|
int in_width, in_height;
|
||||||
int out_width, out_height;
|
int out_width, out_height;
|
||||||
int offsetX, offsetY;
|
int offsetX, offsetY;
|
||||||
|
|
||||||
|
frame_t hwframe;
|
||||||
|
|
||||||
va::display_t::pointer va_display;
|
va::display_t::pointer va_display;
|
||||||
|
|
||||||
file_t file;
|
file_t file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user