Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
3a0a0ec7
Commit
3a0a0ec7
authored
Sep 04, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mkv.cpp: fix chapter sorting by timecode, apply the right PTS/DTS timecodes from the container
parent
24f97b46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
14 deletions
+13
-14
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+13
-14
No files found.
modules/demux/mkv.cpp
View file @
3a0a0ec7
...
...
@@ -953,9 +953,9 @@ public:
std
::
vector
<
chapter_codec_cmds_c
*>
codecs
;
bool
operator
<
(
const
chapter_item_c
&
item
)
const
static
bool
CompareTimecode
(
const
chapter_item_c
*
&
itemA
,
const
chapter_item_c
*
&
itemB
)
{
return
(
i
_user_start_time
<
item
.
i_user_start_time
||
(
i_user_start_time
==
item
.
i_user_start_time
&&
i_user_end_time
<
item
.
i_user_end_time
)
);
return
(
i
temA
->
i_user_start_time
<
itemB
->
i_user_start_time
||
(
itemA
->
i_user_start_time
==
itemB
->
i_user_start_time
&&
itemA
->
i_user_end_time
<
itemB
->
i_user_end_time
)
);
}
bool
Enter
(
bool
b_do_subchapters
);
...
...
@@ -1880,21 +1880,23 @@ static void BlockDecode( demux_t *p_demux, KaxBlock *block, mtime_t i_pts,
}
return
;
}
// TODO implement correct timestamping when B frames are used
#if 0
// correct timestamping when B frames are used
if
(
tk
->
fmt
.
i_cat
!=
VIDEO_ES
)
{
p_block
->
i_dts
=
p_block
->
i_pts
=
i_pts
;
}
else
{
p_block->i_pts = i_pts;
if
(
!
strcmp
(
tk
->
psz_codec
,
"V_MS/VFW/FOURCC"
)
)
{
p_block
->
i_pts
=
0
;
}
else
{
p_block
->
i_pts
=
i_pts
;
}
p_block
->
i_dts
=
p_sys
->
i_pts
;
}
#else
p_block
->
i_pts
=
i_pts
;
p_block
->
i_dts
=
p_sys
->
i_last_dts
;
#endif
#if 0
msg_Dbg( p_demux, "block i_dts: "I64Fd" / i_pts: "I64Fd, p_block->i_dts, p_block->i_pts);
...
...
@@ -1903,10 +1905,6 @@ msg_Dbg( p_demux, "block i_dts: "I64Fd" / i_pts: "I64Fd, p_block->i_dts, p_block
{
p_block
->
i_length
=
i_duration
*
1000
;
}
if
(
!
strcmp
(
tk
->
psz_codec
,
"V_MS/VFW/FOURCC"
)
)
{
p_block
->
i_pts
=
0
;
}
es_out_Send
(
p_demux
->
out
,
tk
->
p_es
,
p_block
);
...
...
@@ -4801,7 +4799,8 @@ int64_t chapter_item_c::RefreshChapters( bool b_ordered, int64_t i_prev_user_tim
}
else
{
std
::
sort
(
sub_chapters
.
begin
(),
sub_chapters
.
end
()
);
if
(
sub_chapters
.
begin
()
!=
sub_chapters
.
end
()
)
std
::
sort
(
sub_chapters
.
begin
(),
sub_chapters
.
end
(),
chapter_item_c
::
CompareTimecode
);
i_user_start_time
=
i_start_time
;
if
(
i_end_time
!=
-
1
)
i_user_end_time
=
i_end_time
;
...
...
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