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
3600b896
Commit
3600b896
authored
Jan 27, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix crash on movit clip jobs.
Fixes
#542
parent
9fbafcdc
Pipeline
#13977
passed with stage
in 18 minutes and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
3600b896
...
...
@@ -861,6 +861,18 @@ std::shared_ptr<Mlt::Producer> ProjectClip::softClone(const char *list)
return
clone
;
}
std
::
unique_ptr
<
Mlt
::
Producer
>
ProjectClip
::
getClone
()
{
const
char
*
list
=
ClipController
::
getPassPropertiesList
();
QString
service
=
QString
::
fromLatin1
(
m_masterProducer
->
get
(
"mlt_service"
));
QString
resource
=
QString
::
fromUtf8
(
m_masterProducer
->
get
(
"resource"
));
std
::
unique_ptr
<
Mlt
::
Producer
>
clone
(
new
Mlt
::
Producer
(
*
m_masterProducer
->
profile
(),
service
.
toUtf8
().
constData
(),
resource
.
toUtf8
().
constData
()));
Mlt
::
Properties
original
(
m_masterProducer
->
get_properties
());
Mlt
::
Properties
cloneProps
(
clone
->
get_properties
());
cloneProps
.
pass_list
(
original
,
list
);
return
clone
;
}
bool
ProjectClip
::
isReady
()
const
{
return
m_clipStatus
==
StatusReady
;
...
...
src/bin/projectclip.h
View file @
3600b896
...
...
@@ -215,6 +215,9 @@ public:
std
::
shared_ptr
<
Mlt
::
Producer
>
cloneProducer
(
bool
removeEffects
=
false
);
static
std
::
shared_ptr
<
Mlt
::
Producer
>
cloneProducer
(
const
std
::
shared_ptr
<
Mlt
::
Producer
>
&
producer
);
std
::
shared_ptr
<
Mlt
::
Producer
>
softClone
(
const
char
*
list
);
/** @brief Returns a clone of the producer, useful for movit clip jobs
*/
std
::
unique_ptr
<
Mlt
::
Producer
>
getClone
();
void
updateTimelineClips
(
const
QVector
<
int
>
&
roles
);
/** @brief Saves the subclips data as json
*/
...
...
src/jobs/meltjob.cpp
View file @
3600b896
...
...
@@ -104,9 +104,13 @@ bool MeltJob::startJob()
double
fps
=
projectProfile
->
fps
();
int
fps_num
=
projectProfile
->
frame_rate_num
();
int
fps_den
=
projectProfile
->
frame_rate_den
();
m_producer
=
std
::
make_unique
<
Mlt
::
Producer
>
(
*
m_profile
.
get
(),
m_url
.
toUtf8
().
constData
());
if
(
KdenliveSettings
::
gpu_accel
())
{
m_producer
=
binClip
->
getClone
();
Mlt
::
Filter
converter
(
*
m_profile
.
get
(),
"avcolor_space"
);
m_producer
->
attach
(
converter
);
}
else
{
m_producer
=
std
::
make_unique
<
Mlt
::
Producer
>
(
*
m_profile
.
get
(),
m_url
.
toUtf8
().
constData
());
}
if
(
m_producer
&&
m_useProducerProfile
)
{
m_profile
->
from_producer
(
*
m_producer
.
get
());
m_profile
->
set_explicit
(
1
);
...
...
src/jobs/scenesplitjob.cpp
View file @
3600b896
...
...
@@ -63,7 +63,6 @@ void SceneSplitJob::configureConsumer()
void
SceneSplitJob
::
configureFilter
()
{
m_filter
=
std
::
make_unique
<
Mlt
::
Filter
>
(
*
m_profile
.
get
(),
"motion_est"
);
if
((
m_filter
==
nullptr
)
||
!
m_filter
->
is_valid
())
{
m_errorMessage
.
append
(
i18n
(
"Cannot create filter motion_est. Cannot split scenes"
));
...
...
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