You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge branch 'fix-swig-flags' into opencv_build_config
This commit is contained in:
@@ -1355,7 +1355,13 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) {
|
||||
std::shared_ptr<Frame> f = CreateFrame(current_frame);
|
||||
|
||||
// Add Image data to frame
|
||||
f->AddImage(width, height, 4, QImage::Format_RGBA8888_Premultiplied, buffer);
|
||||
if (!ffmpeg_has_alpha(AV_GET_CODEC_PIXEL_FORMAT(pStream, pCodecCtx))) {
|
||||
// Add image with no alpha channel, Speed optimization
|
||||
f->AddImage(width, height, 4, QImage::Format_RGBA8888_Premultiplied, buffer);
|
||||
} else {
|
||||
// Add image with alpha channel (this will be converted to premultipled when needed, but is slower)
|
||||
f->AddImage(width, height, 4, QImage::Format_RGBA8888, buffer);
|
||||
}
|
||||
|
||||
// Update working cache
|
||||
working_cache.Add(f);
|
||||
|
||||
Reference in New Issue
Block a user