Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
45c4e5e6
Commit
45c4e5e6
authored
Oct 05, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix freeze on memory usage loading invalid clips
parent
25ba5eaa
Pipeline
#36553
passed with stage
in 33 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
src/jobs/audiothumbjob.cpp
src/jobs/audiothumbjob.cpp
+6
-0
src/jobs/loadjob.cpp
src/jobs/loadjob.cpp
+13
-0
No files found.
src/jobs/audiothumbjob.cpp
View file @
45c4e5e6
...
...
@@ -313,6 +313,12 @@ bool AudioThumbJob::startJob()
return
false
;
}
m_lengthInFrames
=
m_prod
->
get_length
();
// Multiply this if we want more than 1 sample per frame
if
(
m_lengthInFrames
==
INT_MAX
)
{
// This is a broken file or live feed, don't attempt to generate audio thumbnails
m_done
=
true
;
m_successful
=
false
;
return
false
;
}
m_frequency
=
m_binClip
->
audioInfo
()
->
samplingRate
();
m_frequency
=
m_frequency
<=
0
?
48000
:
m_frequency
;
...
...
src/jobs/loadjob.cpp
View file @
45c4e5e6
...
...
@@ -411,6 +411,19 @@ bool LoadJob::startJob()
m_errorMessage
.
append
(
i18n
(
"ERROR: Could not load clip %1: producer is invalid"
,
m_resource
));
return
false
;
}
if
(
m_producer
->
get_length
()
==
INT_MAX
&&
m_producer
->
get
(
"eof"
)
==
QLatin1String
(
"loop"
))
{
// This is a live source or broken clip
m_done
=
true
;
m_successful
=
false
;
if
(
m_producer
)
{
m_producer
.
reset
();
}
qDebug
()
<<
"=== MAX DURATION: "
<<
INT_MAX
<<
", DURATION: "
<<
(
INT_MAX
/
25
/
60
);
QMetaObject
::
invokeMethod
(
pCore
.
get
(),
"displayBinMessage"
,
Qt
::
QueuedConnection
,
Q_ARG
(
QString
,
i18n
(
"Cannot get duration for file %1"
,
m_resource
)),
Q_ARG
(
int
,
(
int
)
KMessageWidget
::
Warning
));
m_errorMessage
.
append
(
i18n
(
"ERROR: Could not load clip %1: producer is invalid"
,
m_resource
));
return
false
;
}
processProducerProperties
(
m_producer
,
m_xml
);
QString
clipName
=
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"kdenlive:clipname"
));
if
(
clipName
.
isEmpty
())
{
...
...
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