Skip to content
GitLab
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
76582a05
Commit
76582a05
authored
Nov 28, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix crash on profile change.
Related to
#440
parent
31259763
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bin/projectitemmodel.cpp
View file @
76582a05
...
...
@@ -650,8 +650,13 @@ bool ProjectItemModel::requestAddBinClip(QString &id, const QDomElement &descrip
if
(
res
)
{
int
loadJob
=
pCore
->
jobManager
()
->
startJob
<
LoadJob
>
({
id
},
-
1
,
QString
(),
description
,
std
::
bind
(
readyCallBack
,
id
));
int
thumbJob
=
pCore
->
jobManager
()
->
startJob
<
ThumbJob
>
({
id
},
loadJob
,
QString
(),
150
,
0
,
true
);
pCore
->
jobManager
()
->
startJob
<
AudioThumbJob
>
({
id
},
loadJob
,
QString
());
pCore
->
jobManager
()
->
startJob
<
CacheJob
>
({
id
},
thumbJob
,
QString
(),
150
);
ClipType
::
ProducerType
type
=
new_clip
->
clipType
();
if
(
type
==
ClipType
::
AV
||
type
==
ClipType
::
Audio
||
type
==
ClipType
::
Playlist
)
{
pCore
->
jobManager
()
->
startJob
<
AudioThumbJob
>
({
id
},
loadJob
,
QString
());
}
if
(
type
==
ClipType
::
AV
||
type
==
ClipType
::
Video
||
type
==
ClipType
::
Playlist
)
{
pCore
->
jobManager
()
->
startJob
<
CacheJob
>
({
id
},
thumbJob
,
QString
(),
150
);
}
}
return
res
;
}
...
...
src/jobs/cachejob.cpp
View file @
76582a05
...
...
@@ -64,6 +64,10 @@ const QString CacheJob::getDescription() const
bool
CacheJob
::
startJob
()
{
// We reload here, because things may have changed since creation of this job
if
(
m_done
)
{
// Job aborted
return
false
;
}
m_binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
m_clipId
);
if
(
m_binClip
->
clipType
()
!=
ClipType
::
Video
&&
m_binClip
->
clipType
()
!=
ClipType
::
AV
&&
m_binClip
->
clipType
()
!=
ClipType
::
Playlist
)
{
// Don't create thumbnail for audio clips
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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