Skip to content

Commit

Permalink
trying to mitigate audio issues encountered with gstreamer and ffmpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
kaamui committed Nov 21, 2024
1 parent 80fb7dd commit 999f01c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/core/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ void ub_message_output(QtMsgType type, const QMessageLogContext& context, const

int main(int argc, char *argv[])
{
#ifdef Q_OS_LINUX
#if (QT_VERSION >= QT_VERSION_CHECK(6, 4, 2))
qputenv("QT_MEDIA_BACKEND", "ffmpeg");
#endif
#endif

// Uncomment next section to have memory leaks information
// tracing in VC++ debug mode under Windows
Expand Down
7 changes: 5 additions & 2 deletions src/domain/UBGraphicsMediaItemDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ void UBGraphicsMediaItemDelegate::mediaStatusChanged(QMediaPlayer::MediaStatus s
&& delegated()->firstLoad()
)
{
delegated()->play();
delegated()->pause();
if (delegated()->getMediaType() == UBGraphicsMediaItem::mediaType_Video)
{
delegated()->play();
delegated()->pause();
}
delegated()->setFirstLoad(false);
}
#endif
Expand Down

0 comments on commit 999f01c

Please sign in to comment.