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
+1 -1
View File
@@ -934,7 +934,7 @@ public:
return 0; return 0;
} }
int set_frame(AVFrame *frame) { int set_frame(AVFrame *frame) override {
this->hwframe.reset(frame); this->hwframe.reset(frame);
this->frame = frame; this->frame = frame;
+2 -3
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); device->set_colorspace(sws_color_space, ctx->color_range);
if(video_format[encoder_t::VUI_PARAMETERS]) { if(video_format[encoder_t::VUI_PARAMETERS]) {
return std::make_optional(session_t { return std::make_optional<session_t>(
std::move(ctx), std::move(ctx),
std::move(device), std::move(device),
{}, util::buffer_t<std::uint8_t> {});
});
} }
return std::make_optional<session_t>( return std::make_optional<session_t>(