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
35736df5
Commit
35736df5
authored
Apr 02, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: store the segment duration in microseconds too
parent
7d78d2e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+13
-13
No files found.
modules/demux/mkv.cpp
View file @
35736df5
...
...
@@ -384,7 +384,7 @@ public:
:
segment
(
NULL
)
,
es
(
estream
)
,
i_timescale
(
MKVD_TIMECODESCALE
)
,
f_duration
(
-
1.0
)
,
i_duration
(
-
1
)
,
i_start_time
(
0
)
,
i_cues_position
(
-
1
)
,
i_chapters_position
(
-
1
)
...
...
@@ -461,7 +461,7 @@ public:
uint64_t
i_timescale
;
/* duration of the segment */
float
f
_duration
;
mtime_t
i
_duration
;
mtime_t
i_start_time
;
/* all tracks */
...
...
@@ -538,7 +538,7 @@ public:
void
Sort
();
size_t
AddSegment
(
matroska_segment_t
*
p_segment
);
void
PreloadLinked
(
);
floa
t
Duration
(
)
const
;
mtime_
t
Duration
(
)
const
;
void
LoadCues
(
);
void
Seek
(
demux_t
&
demuxer
,
mtime_t
i_date
,
mtime_t
i_time_offset
,
const
chapter_item_t
*
psz_chapter
);
...
...
@@ -2809,10 +2809,10 @@ void matroska_segment_t::ParseInfo( EbmlElement *info )
{
KaxDuration
&
dur
=
*
(
KaxDuration
*
)
l
;
f_duration
=
float
(
dur
);
i_duration
=
mtime_t
(
double
(
dur
)
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Duration=
%f"
,
f
_duration
);
msg_Dbg
(
&
sys
.
demuxer
,
"| | + Duration=
"
I64Fd
,
i
_duration
);
}
else
if
(
MKV_IS_ID
(
l
,
KaxMuxingApp
)
)
{
...
...
@@ -2882,7 +2882,7 @@ void matroska_segment_t::ParseInfo( EbmlElement *info )
}
}
f
_duration
*=
i_timescale
/
1000000.0
;
i
_duration
*=
i_timescale
/
1000000.0
;
}
...
...
@@ -3049,7 +3049,7 @@ void matroska_segment_t::ParseChapters( EbmlElement *chapters )
/* update the duration of the segment according to the sum of all sub chapters */
f_dur
=
stored_editions
[
i_default_edition
].
Duration
()
/
I64C
(
1000
);
if
(
f_dur
>
0.0
)
f
_duration
=
f_dur
;
i
_duration
=
f_dur
;
}
}
...
...
@@ -3523,18 +3523,18 @@ void virtual_segment_t::PreloadLinked( )
}
}
floa
t
virtual_segment_t
::
Duration
()
const
mtime_
t
virtual_segment_t
::
Duration
()
const
{
float
f
_duration
;
mtime_t
i
_duration
;
if
(
linked_segments
.
size
()
==
0
)
f_duration
=
0.
0
;
i_duration
=
0
;
else
{
matroska_segment_t
*
p_last_segment
=
linked_segments
[
linked_segments
.
size
()
-
1
];
// p_last_segment->ParseCluster( );
f_duration
=
p_last_segment
->
i_start_time
/
1000
+
p_last_segment
->
f
_duration
;
i_duration
=
p_last_segment
->
i_start_time
/
1000
+
p_last_segment
->
i
_duration
;
}
return
f
_duration
;
return
i
_duration
;
}
void
virtual_segment_t
::
LoadCues
(
)
...
...
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