Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLMC
Manage
Activity
Members
Labels
Plan
Issues
26
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLMC
Commits
3f797e4d
Commit
3f797e4d
authored
7 years ago
by
luyikei
Browse files
Options
Downloads
Patches
Plain Diff
Media: Fix saving/loading sub clips
Somehow we changed the saving format and didn't update it
parent
963f7edf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Library/Library.cpp
+6
-3
6 additions, 3 deletions
src/Library/Library.cpp
src/Media/Media.cpp
+2
-2
2 additions, 2 deletions
src/Media/Media.cpp
with
8 additions
and
5 deletions
src/Library/Library.cpp
+
6
−
3
View file @
3f797e4d
...
...
@@ -83,11 +83,14 @@ Library::postLoad()
for
(
const
auto
&
var
:
m_settings
->
value
(
"medias"
)
->
get
().
toList
()
)
{
auto
map
=
var
.
toMap
();
auto
subClipsMap
=
map
[
"clips"
].
toMap
();
map
[
"clips"
]
=
QVariant
();
auto
m
=
Media
::
fromVariant
(
map
);
addMedia
(
m
);
m
->
loadSubclip
(
subClipsMap
);
if
(
map
.
contains
(
"clips"
)
==
true
)
{
const
auto
&
subClipsList
=
map
[
"clips"
].
toList
();
for
(
const
auto
&
subClip
:
subClipsList
)
m
->
loadSubclip
(
subClip
.
toMap
()
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Media/Media.cpp
+
2
−
2
View file @
3f797e4d
...
...
@@ -211,12 +211,12 @@ Media::snapshot()
QSharedPointer
<
Clip
>
Media
::
loadSubclip
(
const
QVariantMap
&
m
)
{
if
(
m
.
contains
(
"
u
uid"
)
==
false
||
m
.
contains
(
"begin"
)
==
false
||
m
.
contains
(
"end"
)
==
false
)
if
(
m
.
contains
(
"
libraryU
uid"
)
==
false
||
m
.
contains
(
"begin"
)
==
false
||
m
.
contains
(
"end"
)
==
false
)
{
vlmcWarning
()
<<
"Invalid clip provided:"
<<
m
;
return
{};
}
const
auto
&
uuid
=
m
[
"
u
uid"
].
toUuid
();
const
auto
&
uuid
=
m
[
"
libraryU
uid"
].
toUuid
();
const
auto
begin
=
m
[
"begin"
].
toLongLong
();
const
auto
end
=
m
[
"end"
].
toLongLong
();
auto
clip
=
QSharedPointer
<
Clip
>::
create
(
sharedFromThis
(),
begin
,
end
,
uuid
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment