mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix non-sticker Webm in media viewer.
This commit is contained in:
parent
2f9c39fe53
commit
589673e420
2 changed files with 10 additions and 4 deletions
|
@ -187,10 +187,13 @@ void OverlayWidget::RendererGL::paintTransformedVideoFrame(
|
|||
const auto data = _owner->videoFrameWithInfo();
|
||||
if (data.format == Streaming::FrameFormat::None) {
|
||||
return;
|
||||
}
|
||||
if (data.format == Streaming::FrameFormat::ARGB32) {
|
||||
} else if (data.format == Streaming::FrameFormat::ARGB32) {
|
||||
Assert(!data.original.isNull());
|
||||
paintTransformedStaticContent(data.original, geometry, false, false);
|
||||
paintTransformedStaticContent(
|
||||
data.original,
|
||||
geometry,
|
||||
data.alpha,
|
||||
data.alpha);
|
||||
return;
|
||||
}
|
||||
Assert(data.format == Streaming::FrameFormat::YUV420);
|
||||
|
|
|
@ -611,6 +611,7 @@ Streaming::FrameWithInfo OverlayWidget::videoFrameWithInfo() const {
|
|||
.original = _streamed->instance.info().video.cover,
|
||||
.format = Streaming::FrameFormat::ARGB32,
|
||||
.index = -2,
|
||||
.alpha = _streamed->instance.info().video.alpha,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -656,7 +657,9 @@ bool OverlayWidget::opaqueContentShown() const {
|
|||
return contentShown()
|
||||
&& (!_staticContentTransparent
|
||||
|| !_document
|
||||
|| (!_document->isVideoMessage() && !_document->sticker()));
|
||||
|| (!_document->isVideoMessage()
|
||||
&& !_document->sticker()
|
||||
&& (!_streamed || !_streamed->instance.info().video.alpha)));
|
||||
}
|
||||
|
||||
void OverlayWidget::clearStreaming(bool savePosition) {
|
||||
|
|
Loading…
Add table
Reference in a new issue