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
f87a63f7
Commit
f87a63f7
authored
Feb 24, 2022
by
Jean-Baptiste Mardelle
Browse files
On project close, ensure non loaded clips don't leak to the new project
parent
51054fea
Pipeline
#141750
passed with stage
in 5 minutes and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/jobs/cliploadtask.cpp
View file @
f87a63f7
...
...
@@ -275,7 +275,7 @@ void ClipLoadTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip, std::s
int
imageWidth
(
pCore
->
thumbProfile
()
->
width
());
int
fullWidth
(
int
(
imageHeight
*
pCore
->
getCurrentDar
()
+
0.5
));
QImage
result
=
KThumb
::
getFrame
(
frame
.
data
(),
imageWidth
,
imageHeight
,
fullWidth
);
if
(
result
.
isNull
())
{
if
(
result
.
isNull
()
&&
!
m_isCanceled
)
{
qDebug
()
<<
"+++++
\n
INVALID RESULT IMAGE
\n
++++++++++++++"
;
result
=
QImage
(
fullWidth
,
imageHeight
,
QImage
::
Format_ARGB32_Premultiplied
);
result
.
fill
(
Qt
::
red
);
...
...
@@ -283,7 +283,8 @@ void ClipLoadTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip, std::s
p
.
setPen
(
Qt
::
white
);
p
.
drawText
(
0
,
0
,
fullWidth
,
imageHeight
,
Qt
::
AlignCenter
,
i18n
(
"Invalid"
));
QMetaObject
::
invokeMethod
(
binClip
.
get
(),
"setThumbnail"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QImage
,
result
),
Q_ARG
(
int
,
m_in
),
Q_ARG
(
int
,
m_out
),
Q_ARG
(
bool
,
false
));
}
else
if
(
!
m_isCanceled
)
{
}
else
if
(
binClip
.
get
())
{
// We don't follow m_isCanceled there,
qDebug
()
<<
"=== GOT THUMB FOR: "
<<
m_in
<<
"x"
<<
m_out
;
QMetaObject
::
invokeMethod
(
binClip
.
get
(),
"setThumbnail"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QImage
,
result
),
Q_ARG
(
int
,
m_in
),
Q_ARG
(
int
,
m_out
),
Q_ARG
(
bool
,
false
));
ThumbnailCache
::
get
()
->
storeThumbnail
(
QString
::
number
(
m_owner
.
second
),
frameNumber
,
result
,
true
);
...
...
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