Skip to content

Commit 088da21

Browse files
committed
fix(player): correct desktop libmpv video orientation
1 parent dd98feb commit 088da21

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎qml/pages/PlayerOverlayPage.qml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ FocusScope {
271271
MpvVideoItem {
272272
anchors.fill: parent
273273
z: -1
274+
rotation: 180
274275
}
275276

276277
TapHandler { onTapped: overlay.showControls("timeline") }

‎src/player/MpvVideoItem.cpp‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ class MpvFboRenderer final : public QQuickFramebufferObject::Renderer
101101
mpfbo.w = fbo->width();
102102
mpfbo.h = fbo->height();
103103
mpfbo.internal_format = 0;
104+
int flipY = 1;
104105

105106
mpv_render_param params[] = {
106107
{MPV_RENDER_PARAM_OPENGL_FBO, &mpfbo},
108+
{MPV_RENDER_PARAM_FLIP_Y, &flipY},
107109
{MPV_RENDER_PARAM_INVALID, nullptr},
108110
};
109111

@@ -159,9 +161,6 @@ MpvVideoItem::MpvVideoItem(QQuickItem *parent)
159161
if (s_instance)
160162
qWarning() << "MpvVideoItem: replacing existing singleton instance";
161163
s_instance = this;
162-
// mpv writes the FBO with GL's bottom-left origin; Qt scene graph samples
163-
// it top-down. Mirror vertically to compensate.
164-
setMirrorVertically(true);
165164
}
166165

167166
MpvVideoItem::~MpvVideoItem()

0 commit comments

Comments
 (0)