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
7107b37d
Commit
7107b37d
authored
Dec 11, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug with DVD's SCR (too close from the PTS).
parent
66b04c2a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
src/input/mpeg_system.c
src/input/mpeg_system.c
+21
-13
No files found.
src/input/mpeg_system.c
View file @
7107b37d
...
@@ -321,18 +321,12 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
...
@@ -321,18 +321,12 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
/* PTS management */
/* PTS management */
if
(
p_pes
->
b_has_pts
)
if
(
p_pes
->
b_has_pts
)
{
{
//intf_Msg("%lld\n", p_pes->i_pts);
switch
(
p_es
->
p_pgrm
->
i_synchro_state
)
switch
(
p_es
->
p_pgrm
->
i_synchro_state
)
{
{
case
SYNCHRO_NOT_STARTED
:
case
SYNCHRO_NOT_STARTED
:
p_pes
->
b_has_pts
=
0
;
break
;
case
SYNCHRO_START
:
case
SYNCHRO_START
:
p_pes
->
i_pts
+=
p_es
->
p_pgrm
->
delta_cr
;
p_pes
->
b_has_pts
=
0
;
p_es
->
p_pgrm
->
delta_absolute
=
mdate
()
-
p_pes
->
i_pts
+
DEFAULT_PTS_DELAY
;
p_pes
->
i_pts
+=
p_es
->
p_pgrm
->
delta_absolute
;
p_es
->
p_pgrm
->
i_synchro_state
=
SYNCHRO_OK
;
break
;
break
;
case
SYNCHRO_REINIT
:
/* We skip a PES | Why ?? --Meuuh */
case
SYNCHRO_REINIT
:
/* We skip a PES | Why ?? --Meuuh */
...
@@ -342,7 +336,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
...
@@ -342,7 +336,8 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
case
SYNCHRO_OK
:
case
SYNCHRO_OK
:
p_pes
->
i_pts
+=
p_es
->
p_pgrm
->
delta_cr
p_pes
->
i_pts
+=
p_es
->
p_pgrm
->
delta_cr
+
p_es
->
p_pgrm
->
delta_absolute
;
+
p_es
->
p_pgrm
->
delta_absolute
+
DEFAULT_PTS_DELAY
;
break
;
break
;
}
}
}
}
...
@@ -567,7 +562,20 @@ static void CRDecode( input_thread_t * p_input, es_descriptor_t * p_es,
...
@@ -567,7 +562,20 @@ static void CRDecode( input_thread_t * p_input, es_descriptor_t * p_es,
p_pgrm
=
p_input
->
stream
.
pp_programs
[
0
];
p_pgrm
=
p_input
->
stream
.
pp_programs
[
0
];
}
}
if
(
p_input
->
stream
.
b_pace_control
)
if
(
p_pgrm
->
i_synchro_state
!=
SYNCHRO_OK
)
{
switch
(
p_pgrm
->
i_synchro_state
)
{
case
SYNCHRO_START
:
p_pgrm
->
delta_absolute
=
mdate
()
-
cr_time
;
p_pgrm
->
i_synchro_state
=
SYNCHRO_OK
;
break
;
default:
break
;
}
}
else
if
(
p_input
->
stream
.
b_pace_control
)
{
{
/* Wait a while before delivering the packets to the decoder. */
/* Wait a while before delivering the packets to the decoder. */
mwait
(
cr_time
+
p_pgrm
->
delta_absolute
);
mwait
(
cr_time
+
p_pgrm
->
delta_absolute
);
...
@@ -721,7 +729,6 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
...
@@ -721,7 +729,6 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
switch
(
i_code
)
switch
(
i_code
)
{
{
case
0x1BA
:
/* PACK_START_CODE */
case
0x1BA
:
/* PACK_START_CODE */
if
(
p_input
->
stream
.
pp_programs
[
0
]
->
i_synchro_state
==
SYNCHRO_OK
)
{
{
/* Convert the SCR in microseconds. */
/* Convert the SCR in microseconds. */
mtime_t
scr_time
;
mtime_t
scr_time
;
...
@@ -750,9 +757,10 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
...
@@ -750,9 +757,10 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
)
*
300
)
/
27
;
)
*
300
)
/
27
;
}
}
/* Call the pace control. */
/* Call the pace control. */
CRDecode
(
p_input
,
NULL
,
scr_time
);
//intf_Msg("+%lld\n", scr_time);
CRDecode
(
p_input
,
NULL
,
scr_time
-
200000
);
b_trash
=
1
;
}
}
b_trash
=
1
;
break
;
break
;
case
0x1BB
:
/* SYSTEM_START_CODE */
case
0x1BB
:
/* SYSTEM_START_CODE */
...
...
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