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
83867e8a
Commit
83867e8a
authored
May 07, 2005
by
Steve Lhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mkv.cpp: code cleaning
parent
b95300b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
+27
-18
modules/demux/mkv.cpp
modules/demux/mkv.cpp
+27
-18
No files found.
modules/demux/mkv.cpp
View file @
83867e8a
...
@@ -2281,6 +2281,8 @@ void demux_sys_t::StopUiThread()
...
@@ -2281,6 +2281,8 @@ void demux_sys_t::StopUiThread()
vlc_thread_join
(
p_ev
);
vlc_thread_join
(
p_ev
);
vlc_object_destroy
(
p_ev
);
vlc_object_destroy
(
p_ev
);
p_ev
=
NULL
;
msg_Dbg
(
&
demuxer
,
"Stopping the UI Hook"
);
msg_Dbg
(
&
demuxer
,
"Stopping the UI Hook"
);
}
}
b_ui_hooked
=
false
;
b_ui_hooked
=
false
;
...
@@ -2892,9 +2894,10 @@ static int Demux( demux_t *p_demux)
...
@@ -2892,9 +2894,10 @@ static int Demux( demux_t *p_demux)
{
{
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
demux_sys_t
*
p_sys
=
p_demux
->
p_sys
;
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
virtual_segment_c
*
p_vsegment
=
p_sys
->
p_current_segment
;
matroska_segment_c
*
p_segmet
=
p_vsegment
->
Segment
();
matroska_segment_c
*
p_segme
n
t
=
p_vsegment
->
Segment
();
if
(
p_segmet
==
NULL
)
return
0
;
if
(
p_segme
n
t
==
NULL
)
return
0
;
int
i_block_count
=
0
;
int
i_block_count
=
0
;
int
i_return
=
0
;
KaxBlock
*
block
;
KaxBlock
*
block
;
int64_t
i_block_duration
;
int64_t
i_block_duration
;
...
@@ -2904,33 +2907,36 @@ static int Demux( demux_t *p_demux)
...
@@ -2904,33 +2907,36 @@ static int Demux( demux_t *p_demux)
for
(
;;
)
for
(
;;
)
{
{
if
(
p_sys
->
demuxer
.
b_die
)
if
(
p_sys
->
demuxer
.
b_die
)
return
0
;
break
;
if
(
p_sys
->
i_pts
>=
p_sys
->
i_start_pts
)
if
(
p_sys
->
i_pts
>=
p_sys
->
i_start_pts
)
if
(
p_vsegment
->
UpdateCurrentToChapter
(
*
p_demux
)
)
if
(
p_vsegment
->
UpdateCurrentToChapter
(
*
p_demux
)
)
return
1
;
{
i_return
=
1
;
break
;
}
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
&&
p_vsegment
->
CurrentChapter
()
==
NULL
)
{
{
/* nothing left to read in this ordered edition */
/* nothing left to read in this ordered edition */
if
(
!
p_vsegment
->
SelectNext
()
)
if
(
!
p_vsegment
->
SelectNext
()
)
return
0
;
break
;
p_segmet
->
UnSelect
(
);
p_segme
n
t
->
UnSelect
(
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
/* switch to the next segment */
/* switch to the next segment */
p_segmet
=
p_vsegment
->
Segment
();
p_segme
n
t
=
p_vsegment
->
Segment
();
if
(
!
p_segmet
->
Select
(
0
)
)
if
(
!
p_segme
n
t
->
Select
(
0
)
)
{
{
msg_Err
(
p_demux
,
"Failed to select new segment"
);
msg_Err
(
p_demux
,
"Failed to select new segment"
);
return
0
;
break
;
}
}
continue
;
continue
;
}
}
if
(
p_segmet
->
BlockGet
(
&
block
,
&
i_block_ref1
,
&
i_block_ref2
,
&
i_block_duration
)
)
if
(
p_segme
n
t
->
BlockGet
(
&
block
,
&
i_block_ref1
,
&
i_block_ref2
,
&
i_block_duration
)
)
{
{
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
)
if
(
p_vsegment
->
Edition
()
&&
p_vsegment
->
Edition
()
->
b_ordered
)
{
{
...
@@ -2945,25 +2951,25 @@ static int Demux( demux_t *p_demux)
...
@@ -2945,25 +2951,25 @@ static int Demux( demux_t *p_demux)
p_sys
->
i_pts
=
p_chap
->
i_user_end_time
;
p_sys
->
i_pts
=
p_chap
->
i_user_end_time
;
p_sys
->
i_pts
++
;
// trick to avoid staying on segments with no duration and no content
p_sys
->
i_pts
++
;
// trick to avoid staying on segments with no duration and no content
return
1
;
i_return
=
1
;
}
}
return
0
;
break
;
}
}
msg_Warn
(
p_demux
,
"cannot get block EOF?"
);
msg_Warn
(
p_demux
,
"cannot get block EOF?"
);
p_segmet
->
UnSelect
(
);
p_segme
n
t
->
UnSelect
(
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
es_out_Control
(
p_demux
->
out
,
ES_OUT_RESET_PCR
);
/* switch to the next segment */
/* switch to the next segment */
if
(
!
p_vsegment
->
SelectNext
()
)
if
(
!
p_vsegment
->
SelectNext
()
)
// no more segments in this stream
// no more segments in this stream
return
0
;
break
;
p_segmet
=
p_vsegment
->
Segment
();
p_segme
n
t
=
p_vsegment
->
Segment
();
if
(
!
p_segmet
->
Select
(
0
)
)
if
(
!
p_segme
n
t
->
Select
(
0
)
)
{
{
msg_Err
(
p_demux
,
"Failed to select new segment"
);
msg_Err
(
p_demux
,
"Failed to select new segment"
);
return
0
;
break
;
}
}
continue
;
continue
;
...
@@ -2984,9 +2990,12 @@ static int Demux( demux_t *p_demux)
...
@@ -2984,9 +2990,12 @@ static int Demux( demux_t *p_demux)
// TODO optimize when there is need to leave or when seeking has been called
// TODO optimize when there is need to leave or when seeking has been called
if
(
i_block_count
>
5
)
if
(
i_block_count
>
5
)
{
{
return
1
;
i_return
=
1
;
break
;
}
}
}
}
return
i_return
;
}
}
...
...
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