mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-02 14:56:56 +00:00
FIX: ffmpeg swscale & frame_size
Change-Id: I9f4cb8c739b726f7e5cdbe0df7ed06b2eb2154d5 Jira: STUDIO-7624 (cherry picked from commit 5a2c75d835fb437667b590a803eef148baa30875)
This commit is contained in:
@@ -79,7 +79,7 @@ bool AVVideoDecoder::toWxImage(wxImage &image, wxSize const &size2)
|
||||
sws_ctx_ = sws_getCachedContext(sws_ctx_,
|
||||
frame_->width, frame_->height, AVPixelFormat(frame_->format),
|
||||
size.GetWidth(), size.GetHeight(), wxFmt,
|
||||
SWS_POINT, // SWS_FAST_BILINEAR //SWS_BICUBIC
|
||||
SWS_GAUSS,
|
||||
nullptr, nullptr, nullptr);
|
||||
int length = size.GetWidth() * size.GetHeight() * 3;
|
||||
if (bits_.size() < length)
|
||||
@@ -108,7 +108,7 @@ bool AVVideoDecoder::toWxBitmap(wxBitmap &bitmap, wxSize const &size2)
|
||||
sws_ctx_ = sws_getCachedContext(sws_ctx_,
|
||||
frame_->width, frame_->height, AVPixelFormat(frame_->format),
|
||||
size.GetWidth(), size.GetHeight(), wxFmt,
|
||||
SWS_POINT, // SWS_FAST_BILINEAR //SWS_BICUBIC
|
||||
SWS_GAUSS,
|
||||
nullptr, nullptr, nullptr);
|
||||
int length = size.GetWidth() * size.GetHeight() * 4;
|
||||
if (bits_.size() < length)
|
||||
|
||||
Reference in New Issue
Block a user