Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
1a36621c
Commit
1a36621c
authored
Dec 07, 2000
by
Christophe Massiot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We now correctly parse
MPEG-1
SCR and there is no need to kludge to read
the stream at the right pace.
parent
7bd6b4e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
18 deletions
+25
-18
src/input/input_ps.c
src/input/input_ps.c
+0
-8
src/input/mpeg_system.c
src/input/mpeg_system.c
+25
-10
No files found.
src/input/input_ps.c
View file @
1a36621c
...
...
@@ -243,14 +243,6 @@ static void PSRead( input_thread_t * p_input,
p_method
->
stream
);
}
}
else
{
/* FIXME: kludge to avoid SCR to block everything (SCR
* calculus appears to be wrong). */
p_data
->
p_buffer
[
4
]
=
p_data
->
p_buffer
[
5
]
=
p_data
->
p_buffer
[
6
]
=
p_data
->
p_buffer
[
7
]
=
p_data
->
p_buffer
[
8
]
=
0
;
}
}
memset
(
p_packets
,
0
,
sizeof
(
p_packets
)
);
...
...
src/input/mpeg_system.c
View file @
1a36621c
...
...
@@ -69,6 +69,7 @@ void input_DecodePES( input_thread_t * p_input, es_descriptor_t * p_es )
{
vlc_mutex_lock
(
&
p_es
->
p_decoder_fifo
->
data_lock
);
#if 0
if( p_input->stream.b_pace_control )
{
/* FIXME : normally we shouldn't need this... */
...
...
@@ -79,6 +80,7 @@ void input_DecodePES( input_thread_t * p_input, es_descriptor_t * p_es )
vlc_mutex_lock( &p_es->p_decoder_fifo->data_lock );
}
}
#endif
if
(
!
DECODER_FIFO_ISFULL
(
*
p_es
->
p_decoder_fifo
)
)
{
...
...
@@ -724,16 +726,29 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
/* Convert the SCR in microseconds. */
mtime_t
scr_time
;
/* FIXME : this calculus is broken with MPEG-1 ! */
scr_time
=
((
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x38
)
<<
27
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x3
)
<<
26
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
5
])
<<
20
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0xF8
)
<<
12
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0x3
)
<<
13
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
7
])
<<
5
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
8
]
&
0xF8
)
>>
3
)
)
*
300
)
/
27
;
if
(
(
p_data
->
p_buffer
[
4
]
&
0xC0
)
==
0x40
)
{
/* MPEG-2 */
scr_time
=
((
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x38
)
<<
27
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x3
)
<<
26
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
5
])
<<
20
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0xF8
)
<<
12
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0x3
)
<<
13
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
7
])
<<
5
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
8
]
&
0xF8
)
>>
3
)
)
*
300
)
/
27
;
}
else
{
/* MPEG-1 SCR is like PTS */
scr_time
=
((
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x0E
)
<<
29
)
|
(((
mtime_t
)
U16_AT
(
p_data
->
p_buffer
+
5
)
<<
14
)
-
(
1
<<
14
))
|
((
mtime_t
)
U16_AT
(
p_data
->
p_buffer
+
7
)
>>
1
)
)
*
300
)
/
27
;
}
/* Call the pace control. */
CRDecode
(
p_input
,
NULL
,
scr_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