Skip to content

Commit

Permalink
fix an issue causing free called on unallocated data
Browse files Browse the repository at this point in the history
  • Loading branch information
loki committed Jun 17, 2021
1 parent 4024378 commit 23b09e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sunshine/platform/linux/vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ class egl_t : public platf::hwdevice_t {
return 0;
}

int set_frame(AVFrame *frame) {
int set_frame(AVFrame *frame) override {
this->hwframe.reset(frame);
this->frame = frame;

Expand Down
5 changes: 2 additions & 3 deletions sunshine/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,10 @@ std::optional<session_t> make_session(const encoder_t &encoder, const config_t &
device->set_colorspace(sws_color_space, ctx->color_range);

if(video_format[encoder_t::VUI_PARAMETERS]) {
return std::make_optional(session_t {
return std::make_optional<session_t>(
std::move(ctx),
std::move(device),
{},
});
util::buffer_t<std::uint8_t> {});
}

return std::make_optional<session_t>(
Expand Down

0 comments on commit 23b09e3

Please sign in to comment.