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
dfee6c18
Commit
dfee6c18
authored
Oct 01, 2022
by
Julius Künzel
💬
Browse files
Fix thumbnails for loopable clips
parent
b5efba98
Pipeline
#239317
passed with stage
in 5 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qmltypes/thumbnailprovider.cpp
View file @
dfee6c18
...
...
@@ -34,6 +34,11 @@ QImage ThumbnailProvider::requestImage(const QString &id, QSize *size, const QSi
if
(
ok
)
{
std
::
shared_ptr
<
ProjectClip
>
binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
binId
);
if
(
binClip
)
{
int
duration
=
binClip
->
frameDuration
();
if
(
frameNumber
>
duration
)
{
// for endless loopable clips, we rewrite the the position
frameNumber
=
frameNumber
-
((
frameNumber
/
duration
)
*
duration
);
}
result
=
ThumbnailCache
::
get
()
->
getThumbnail
(
binClip
->
hashForThumbs
(),
binId
,
frameNumber
);
if
(
!
result
.
isNull
())
{
*
size
=
result
.
size
();
...
...
Julius Künzel
💬
@jlskuz
mentioned in commit
a2c9a6ef
·
Oct 01, 2022
mentioned in commit
a2c9a6ef
mentioned in commit a2c9a6efe32f03778647cea7d0ce723ee073d848
Toggle commit list
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