Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
5c44370a
Commit
5c44370a
authored
Jul 08, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix loading .mlt playlist can corrupt project profile
Fixes
#266
parent
ad990b83
Pipeline
#5076
passed with stage
in 24 minutes and 25 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
src/jobs/loadjob.cpp
src/jobs/loadjob.cpp
+5
-2
src/jobs/stabilizejob.cpp
src/jobs/stabilizejob.cpp
+1
-1
No files found.
src/jobs/loadjob.cpp
View file @
5c44370a
...
...
@@ -129,13 +129,16 @@ std::shared_ptr<Mlt::Producer> LoadJob::loadPlaylist(QString &resource)
qDebug
()
<<
"////// ERROR, CANNOT LOAD SELECTED PLAYLIST: "
<<
resource
;
return
nullptr
;
}
if
(
pCore
->
getCurrentProfile
()
->
isCompatible
(
xmlProfile
.
get
()))
{
std
::
unique_ptr
<
ProfileInfo
>
prof
(
new
ProfileParam
(
xmlProfile
.
get
()));
if
(
static_cast
<
ProfileInfo
*>
(
pCore
->
getCurrentProfile
().
get
())
==
prof
.
get
())
{
// We can use the "xml" producer since profile is the same (using it with different profiles corrupts the project.
// Beware that "consumer" currently crashes on audio mixes!
//resource.prepend(QStringLiteral("xml:"));
}
else
{
// This is currently crashing so I guess we'd better reject it for now
if
(
!
pCore
->
getCurrentProfile
()
->
isCompatible
(
xmlProfile
.
get
()))
{
m_errorMessage
.
append
(
i18n
(
"Playlist has a different framerate (%1/%2fps), not recommended."
,
xmlProfile
->
frame_rate_num
(),
xmlProfile
->
frame_rate_den
()));
}
QString
loader
=
resource
;
loader
.
prepend
(
QStringLiteral
(
"consumer:"
));
pCore
->
getCurrentProfile
()
->
set_explicit
(
1
);
...
...
src/jobs/stabilizejob.cpp
View file @
5c44370a
...
...
@@ -36,7 +36,7 @@
#include <memory>
#include <mlt++/Mlt.h>
StabilizeJob
::
StabilizeJob
(
const
QString
&
binId
,
const
QString
&
filterName
,
QString
destUrl
,
std
::
unordered_map
<
QString
,
QString
>
filterParams
)
:
MeltJob
(
binId
,
STABILIZEJOB
,
tru
e
,
-
1
,
-
1
)
:
MeltJob
(
binId
,
STABILIZEJOB
,
fals
e
,
-
1
,
-
1
)
,
m_filterName
(
filterName
)
,
m_destUrl
(
std
::
move
(
destUrl
))
,
m_filterParams
(
std
::
move
(
filterParams
))
...
...
Write
Preview
Markdown
is supported
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