Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
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
videolan
vlc-2-2
Commits
b9188c54
Commit
b9188c54
authored
Nov 18, 2010
by
Hugo Beauzée-Luyssen
Committed by
Rémi Duraffort
Nov 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: Use new vlc_delete_all to clear containers.
Signed-off-by:
Rémi Duraffort
<
ivoire@videolan.org
>
parent
a1a0cafb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
38 deletions
+13
-38
modules/demux/mkv/chapters.cpp
modules/demux/mkv/chapters.cpp
+8
-18
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+5
-20
No files found.
modules/demux/mkv/chapters.cpp
View file @
b9188c54
...
...
@@ -28,18 +28,8 @@
chapter_item_c
::~
chapter_item_c
()
{
std
::
vector
<
chapter_codec_cmds_c
*>::
iterator
index
=
codecs
.
begin
();
while
(
index
!=
codecs
.
end
()
)
{
delete
(
*
index
);
++
index
;
}
std
::
vector
<
chapter_item_c
*>::
iterator
index_
=
sub_chapters
.
begin
();
while
(
index_
!=
sub_chapters
.
end
()
)
{
delete
(
*
index_
);
++
index_
;
}
vlc_delete_all
(
codecs
);
vlc_delete_all
(
sub_chapters
);
}
int
chapter_item_c
::
PublishChapters
(
input_title_t
&
title
,
int
&
i_user_chapters
,
int
i_level
)
...
...
@@ -93,7 +83,7 @@ chapter_item_c *chapter_item_c::BrowseCodecPrivate( unsigned int codec_id,
return
this
;
++
index
;
}
// sub-chapters
chapter_item_c
*
p_result
=
NULL
;
std
::
vector
<
chapter_item_c
*>::
const_iterator
index2
=
sub_chapters
.
begin
();
...
...
@@ -104,7 +94,7 @@ chapter_item_c *chapter_item_c::BrowseCodecPrivate( unsigned int codec_id,
return
p_result
;
++
index2
;
}
return
p_result
;
}
...
...
@@ -183,7 +173,7 @@ int16 chapter_item_c::GetTitleNumber( ) const
int64_t
chapter_item_c
::
RefreshChapters
(
bool
b_ordered
,
int64_t
i_prev_user_time
)
{
int64_t
i_user_time
=
i_prev_user_time
;
// first the sub-chapters, and then ourself
std
::
vector
<
chapter_item_c
*>::
iterator
index
=
sub_chapters
.
begin
();
while
(
index
!=
sub_chapters
.
end
()
)
...
...
@@ -245,7 +235,7 @@ chapter_item_c *chapter_item_c::FindTimecode( mtime_t i_user_timecode, const cha
psz_result
=
(
*
index
)
->
FindTimecode
(
i_user_timecode
,
p_current
,
b_found
);
++
index
;
}
if
(
psz_result
==
NULL
)
psz_result
=
this
;
}
...
...
@@ -379,14 +369,14 @@ void chapter_edition_c::RefreshChapters( )
mtime_t
chapter_edition_c
::
Duration
()
const
{
mtime_t
i_result
=
0
;
if
(
sub_chapters
.
size
()
)
{
std
::
vector
<
chapter_item_c
*>::
const_iterator
index
=
sub_chapters
.
end
();
--
index
;
i_result
=
(
*
index
)
->
i_user_end_time
;
}
return
i_result
;
}
...
...
modules/demux/mkv/matroska_segment.cpp
View file @
b9188c54
...
...
@@ -66,24 +66,9 @@ matroska_segment_c::~matroska_segment_c()
delete
p_prev_segment_uid
;
delete
p_next_segment_uid
;
std
::
vector
<
chapter_edition_c
*>::
iterator
index
=
stored_editions
.
begin
();
while
(
index
!=
stored_editions
.
end
()
)
{
delete
(
*
index
);
++
index
;
}
std
::
vector
<
chapter_translation_c
*>::
iterator
indext
=
translations
.
begin
();
while
(
indext
!=
translations
.
end
()
)
{
delete
(
*
indext
);
++
indext
;
}
std
::
vector
<
KaxSegmentFamily
*>::
iterator
indexf
=
families
.
begin
();
while
(
indexf
!=
families
.
end
()
)
{
delete
(
*
indexf
);
++
indexf
;
}
vlc_delete_all
(
stored_editions
);
vlc_delete_all
(
translations
);
vlc_delete_all
(
families
);
}
...
...
@@ -890,7 +875,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
p
[
8
]
==
'R'
&&
p
[
9
]
==
'V'
&&
(
p
[
10
]
==
'3'
||
p
[
10
]
==
'4'
)
&&
p
[
11
]
==
'0'
)
{
p_tk
->
fmt
.
video
.
i_frame_rate
=
p_tk
->
fmt
.
video
.
i_frame_rate
=
p
[
22
]
<<
24
|
p
[
23
]
<<
16
|
p
[
24
]
<<
8
|
p
[
25
]
<<
0
;
p_tk
->
fmt
.
video
.
i_frame_rate_base
=
65536
;
}
...
...
@@ -1091,7 +1076,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
p_fmt
->
i_codec
=
VLC_CODEC_TTA
;
if
(
p_tk
->
i_extra_data
>
0
)
{
fill_extra_data
(
p_tk
,
0
);
fill_extra_data
(
p_tk
,
0
);
}
else
{
...
...
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