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
a0ee7281
Commit
a0ee7281
authored
Mar 13, 2015
by
Steve Lhomme
Committed by
Jean-Baptiste Kempf
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MKV: divide i_default_duration by 1000 once and for all
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
3828eb93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
modules/demux/mkv/matroska_segment_parse.cpp
modules/demux/mkv/matroska_segment_parse.cpp
+3
-2
modules/demux/mkv/mkv.cpp
modules/demux/mkv/mkv.cpp
+3
-3
No files found.
modules/demux/mkv/matroska_segment_parse.cpp
View file @
a0ee7281
...
@@ -337,7 +337,8 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
...
@@ -337,7 +337,8 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
KaxTrackDefaultDuration
&
defd
=
*
(
KaxTrackDefaultDuration
*
)
l
;
KaxTrackDefaultDuration
&
defd
=
*
(
KaxTrackDefaultDuration
*
)
l
;
tk
->
i_default_duration
=
uint64
(
defd
);
tk
->
i_default_duration
=
uint64
(
defd
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | + Track Default Duration=%"
PRId64
,
uint64
(
defd
)
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | + Track Default Duration=%"
PRId64
,
tk
->
i_default_duration
);
tk
->
i_default_duration
/=
1000
;
}
}
else
if
(
MKV_IS_ID
(
l
,
KaxTrackTimecodeScale
)
)
else
if
(
MKV_IS_ID
(
l
,
KaxTrackTimecodeScale
)
)
{
{
...
@@ -532,7 +533,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
...
@@ -532,7 +533,7 @@ void matroska_segment_c::ParseTrackEntry( KaxTrackEntry *m )
msg_Dbg
(
&
sys
.
demuxer
,
"| | | + Track Video"
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | | + Track Video"
);
tk
->
f_fps
=
0.0
;
tk
->
f_fps
=
0.0
;
tk
->
fmt
.
video
.
i_frame_rate_base
=
(
unsigned
int
)
(
tk
->
i_default_duration
/
1000
)
;
tk
->
fmt
.
video
.
i_frame_rate_base
=
(
unsigned
int
)
tk
->
i_default_duration
;
tk
->
fmt
.
video
.
i_frame_rate
=
1000000
;
tk
->
fmt
.
video
.
i_frame_rate
=
1000000
;
for
(
unsigned
int
j
=
0
;
j
<
tkv
->
ListSize
();
j
++
)
for
(
unsigned
int
j
=
0
;
j
<
tkv
->
ListSize
();
j
++
)
...
...
modules/demux/mkv/mkv.cpp
View file @
a0ee7281
...
@@ -604,7 +604,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
...
@@ -604,7 +604,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
handle_real_audio
(
p_demux
,
tk
,
p_block
,
i_pts
);
handle_real_audio
(
p_demux
,
tk
,
p_block
,
i_pts
);
block_Release
(
p_block
);
block_Release
(
p_block
);
i_pts
=
(
tk
->
i_default_duration
)
?
i_pts
=
(
tk
->
i_default_duration
)
?
i_pts
+
(
mtime_t
)
(
tk
->
i_default_duration
/
1000
)
:
i_pts
+
(
mtime_t
)
tk
->
i_default_duration
:
VLC_TS_INVALID
;
VLC_TS_INVALID
;
continue
;
continue
;
}
}
...
@@ -673,7 +673,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
...
@@ -673,7 +673,7 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
if
(
b_key_picture
||
b_discardable_picture
)
if
(
b_key_picture
||
b_discardable_picture
)
p_block
->
i_dts
=
p_block
->
i_pts
;
p_block
->
i_dts
=
p_block
->
i_pts
;
else
else
p_block
->
i_dts
=
min
(
i_pts
,
tk
->
i_last_dts
+
(
mtime_t
)
(
tk
->
i_default_duration
/
1000
)
);
p_block
->
i_dts
=
min
(
i_pts
,
tk
->
i_last_dts
+
(
mtime_t
)
tk
->
i_default_duration
);
}
}
}
}
if
(
p_block
->
i_dts
>
VLC_TS_INVALID
&&
if
(
p_block
->
i_dts
>
VLC_TS_INVALID
&&
...
@@ -701,7 +701,7 @@ msg_Dbg( p_demux, "block (track=%d) i_dts: %"PRId64" / i_pts: %"PRId64, tk->i_nu
...
@@ -701,7 +701,7 @@ msg_Dbg( p_demux, "block (track=%d) i_dts: %"PRId64" / i_pts: %"PRId64, tk->i_nu
/* use time stamp only for first block */
/* use time stamp only for first block */
i_pts
=
(
tk
->
i_default_duration
)
?
i_pts
=
(
tk
->
i_default_duration
)
?
i_pts
+
(
mtime_t
)
(
tk
->
i_default_duration
/
1000
)
:
i_pts
+
(
mtime_t
)
tk
->
i_default_duration
:
VLC_TS_INVALID
;
VLC_TS_INVALID
;
}
}
}
}
...
...
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