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
0125b74d
Commit
0125b74d
authored
Feb 21, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix marker thumbnail size.
Related to
#1314
parent
842ebb45
Pipeline
#140727
passed with stage
in 7 minutes and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
0125b74d
...
...
@@ -649,7 +649,17 @@ std::shared_ptr<Mlt::Producer> ProjectClip::thumbProducer()
if
(
mltService
==
QLatin1String
(
"avformat"
))
{
mltService
=
QStringLiteral
(
"avformat-novalidate"
);
}
m_thumbsProducer
.
reset
(
new
Mlt
::
Producer
(
*
pCore
->
thumbProfile
(),
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
Mlt
::
Profile
*
profile
=
pCore
->
thumbProfile
();
if
(
mltService
.
startsWith
(
QLatin1String
(
"xml"
)))
{
// Xml producers can corrupt the profile, so enforce width/height again after loading
int
profileWidth
=
profile
->
width
();
int
profileHeight
=
profile
->
height
();
m_thumbsProducer
.
reset
(
new
Mlt
::
Producer
(
*
profile
,
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
profile
->
set_width
(
profileWidth
);
profile
->
set_height
(
profileHeight
);
}
else
{
m_thumbsProducer
.
reset
(
new
Mlt
::
Producer
(
*
profile
,
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
}
if
(
m_thumbsProducer
->
is_valid
())
{
Mlt
::
Properties
original
(
m_masterProducer
->
get_properties
());
Mlt
::
Properties
cloneProps
(
m_thumbsProducer
->
get_properties
());
...
...
src/jobs/cliploadtask.cpp
View file @
0125b74d
...
...
@@ -237,7 +237,17 @@ void ClipLoadTask::generateThumbnail(std::shared_ptr<ProjectClip>binClip, std::s
if
(
mltService
==
QLatin1String
(
"avformat"
))
{
mltService
=
QStringLiteral
(
"avformat-novalidate"
);
}
std
::
unique_ptr
<
Mlt
::
Producer
>
thumbProd
(
new
Mlt
::
Producer
(
*
pCore
->
thumbProfile
(),
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
std
::
unique_ptr
<
Mlt
::
Producer
>
thumbProd
;
Mlt
::
Profile
*
profile
=
pCore
->
thumbProfile
();
if
(
mltService
.
startsWith
(
QLatin1String
(
"xml"
)))
{
int
profileWidth
=
profile
->
width
();
int
profileHeight
=
profile
->
height
();
thumbProd
.
reset
(
new
Mlt
::
Producer
(
*
profile
,
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
profile
->
set_width
(
profileWidth
);
profile
->
set_height
(
profileHeight
);
}
else
{
thumbProd
.
reset
(
new
Mlt
::
Producer
(
*
profile
,
mltService
.
toUtf8
().
constData
(),
mltResource
.
toUtf8
().
constData
()));
}
if
(
thumbProd
)
{
thumbProd
->
set
(
"audio_index"
,
-
1
);
Mlt
::
Properties
original
(
producer
->
get_properties
());
...
...
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