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
acec2793
Commit
acec2793
authored
8 years ago
by
luyikei
Committed by
Hugo Beauzée-Luyssen
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use QSharedPointer<Clip>::create
Signed-off-by:
Hugo Beauzée-Luyssen
<
hugo@beauzee.fr
>
parent
fcd8ea8d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Media/Media.cpp
+3
-3
3 additions, 3 deletions
src/Media/Media.cpp
with
3 additions
and
3 deletions
src/Media/Media.cpp
+
3
−
3
View file @
acec2793
...
...
@@ -125,7 +125,7 @@ Media::baseClip()
QSharedPointer
<
Clip
>
Media
::
cut
(
qint64
begin
,
qint64
end
)
{
auto
clip
=
QSharedPointer
<
Clip
>
(
new
Clip
(
sharedFromThis
(),
begin
,
end
)
);
auto
clip
=
QSharedPointer
<
Clip
>
::
create
(
sharedFromThis
(),
begin
,
end
);
m_clips
[
clip
->
uuid
()]
=
clip
;
emit
subclipAdded
(
clip
);
return
clip
;
...
...
@@ -193,7 +193,7 @@ Media::fromVariant( const QVariant& v )
auto
uuid
=
m
[
"uuid"
].
toUuid
();
auto
mlMedia
=
Core
::
instance
()
->
mediaLibrary
()
->
media
(
mediaId
);
//FIXME: Is QSharedPointer exception safe in case its constructor throws an exception?
auto
media
=
QSharedPointer
<
Media
>
(
new
Media
(
mlMedia
,
uuid
)
);
auto
media
=
QSharedPointer
<
Media
>
::
create
(
mlMedia
,
uuid
);
// Now load the subclips:
if
(
m
.
contains
(
"clips"
)
==
false
)
...
...
@@ -225,7 +225,7 @@ Media::loadSubclip( const QVariantMap& m )
const
auto
begin
=
m
[
"begin"
].
toLongLong
();
const
auto
end
=
m
[
"end"
].
toLongLong
();
const
auto
formats
=
m
[
"formats"
].
toInt
();
auto
clip
=
QSharedPointer
<
Clip
>
(
new
Clip
(
sharedFromThis
(),
begin
,
end
,
uuid
)
);
auto
clip
=
QSharedPointer
<
Clip
>
::
create
(
sharedFromThis
(),
begin
,
end
,
uuid
);
clip
->
setFormats
(
static_cast
<
Clip
::
Formats
>
(
formats
)
);
m_clips
[
uuid
]
=
clip
;
...
...
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