renderer: if texture is null, don't allocate a frame unless exporting

This commit is contained in:
itsmattkc
2020-09-19 12:53:07 +10:00
parent 7bc841904a
commit 8e0c86a6fa
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ void RenderWorker::RenderFrame(RenderTicketPtr ticket, ViewerOutput* viewer, con
FramePtr frame = Frame::Create();
frame->set_timestamp(time);
if (video_force_download_resolution_ || texture.isNull()) {
if (video_force_download_resolution_) {
// If we're setting the resolution ourselves or we're zeroing it out, allocate the frame now
frame->set_video_params(VideoParams(video_params_.width(),
video_params_.height(),
+5 -1
View File
@@ -99,7 +99,11 @@ void ViewerDisplayWidget::SetSignalCursorColorEnabled(bool e)
void ViewerDisplayWidget::SetImage(FramePtr in_buffer)
{
last_loaded_buffer_ = in_buffer;
if (in_buffer && in_buffer->is_allocated()) {
last_loaded_buffer_ = in_buffer;
} else {
last_loaded_buffer_ = nullptr;
}
if (last_loaded_buffer_) {
makeCurrent();