Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
7d053acc
Commit
7d053acc
authored
Apr 14, 2021
by
Jean-Baptiste Mardelle
Browse files
Workaround crash playing remote files in MLT 6.26.0
parent
3a36c4ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
7d053acc
...
...
@@ -76,6 +76,8 @@
#include "dialogs/textbasededit.h"
#include "project/dialogs/temporarydata.h"
#include <framework/mlt_version.h>
#ifdef USE_JOGSHUTTLE
#include "jogshuttle/jogmanager.h"
#endif
...
...
@@ -101,6 +103,7 @@
#include <kns3/knewstuffaction.h>
#include <ktogglefullscreenaction.h>
#include <kwidgetsaddons_version.h>
#include <KRun>
#include "kdenlive_debug.h"
#include <QAction>
...
...
@@ -355,9 +358,14 @@ void MainWindow::init(const QString &mltPath)
auto
*
onlineResources
=
new
ResourceWidget
(
this
);
m_onlineResourcesDock
=
addDock
(
i18n
(
"Online Resources"
),
QStringLiteral
(
"onlineresources"
),
onlineResources
);
connect
(
onlineResources
,
&
ResourceWidget
::
previewClip
,
[
&
](
const
QString
&
path
,
const
QString
&
title
)
{
qDebug
()
<<
"MLT VER: "
<<
LIBMLT_VERSION_INT
<<
"; QTVER: "
<<
QT_VERSION_CHECK
(
6
,
26
,
0
);
#if LIBMLT_VERSION_INT == QT_VERSION_CHECK(6,26,0)
new
KRun
(
QUrl
(
path
),
this
);
#else
m_clipMonitor
->
slotPreviewResource
(
path
,
title
);
m_clipMonitorDock
->
show
();
m_clipMonitorDock
->
raise
();
#endif
});
connect
(
onlineResources
,
&
ResourceWidget
::
addClip
,
this
,
&
MainWindow
::
slotAddProjectClip
);
...
...
src/monitor/glwidget.cpp
View file @
7d053acc
...
...
@@ -884,6 +884,10 @@ int GLWidget::setProducer(const QString &file)
m_producer
.
reset
();
}
m_producer
=
std
::
make_shared
<
Mlt
::
Producer
>
(
new
Mlt
::
Producer
(
pCore
->
getCurrentProfile
()
->
profile
(),
nullptr
,
file
.
toUtf8
().
constData
()));
if
(
!
m_producer
&&
!
m_producer
->
is_valid
())
{
m_producer
.
reset
();
m_producer
=
m_blackClip
;
}
if
(
m_consumer
)
{
//m_consumer->stop();
if
(
!
m_consumer
->
is_stopped
())
{
...
...
src/monitor/monitor.cpp
View file @
7d053acc
...
...
@@ -1736,7 +1736,6 @@ void Monitor::slotPreviewResource(const QString &path, const QString &title)
slotOpenClip
(
nullptr
);
m_streamAction
->
setVisible
(
false
);
m_glMonitor
->
setProducer
(
path
);
m_glMonitor
->
producer
();
m_timePos
->
setRange
(
0
,
m_glMonitor
->
producer
()
->
get_length
()
-
1
);
m_glMonitor
->
getControllerProxy
()
->
setClipProperties
(
-
1
,
ClipType
::
Unknown
,
false
,
title
);
m_glMonitor
->
setRulerInfo
(
m_glMonitor
->
producer
()
->
get_length
()
-
1
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment