fix an issue causing free called on unallocated data

This commit is contained in:
loki
2021-06-17 23:26:25 +02:00
parent 4024378772
commit 23b09e3d41
2 changed files with 3 additions and 4 deletions

View File

@@ -934,7 +934,7 @@ public:
return 0;
}
int set_frame(AVFrame *frame) {
int set_frame(AVFrame *frame) override {
this->hwframe.reset(frame);
this->frame = frame;

View File

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