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
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
Show 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,
...
@@ -243,14 +243,6 @@ static void PSRead( input_thread_t * p_input,
p_method
->
stream
);
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
)
);
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 )
...
@@ -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
);
vlc_mutex_lock
(
&
p_es
->
p_decoder_fifo
->
data_lock
);
#if 0
if( p_input->stream.b_pace_control )
if( p_input->stream.b_pace_control )
{
{
/* FIXME : normally we shouldn't need this... */
/* FIXME : normally we shouldn't need this... */
...
@@ -79,6 +80,7 @@ void input_DecodePES( input_thread_t * p_input, es_descriptor_t * p_es )
...
@@ -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 );
vlc_mutex_lock( &p_es->p_decoder_fifo->data_lock );
}
}
}
}
#endif
if
(
!
DECODER_FIFO_ISFULL
(
*
p_es
->
p_decoder_fifo
)
)
if
(
!
DECODER_FIFO_ISFULL
(
*
p_es
->
p_decoder_fifo
)
)
{
{
...
@@ -724,8 +726,11 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
...
@@ -724,8 +726,11 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
/* Convert the SCR in microseconds. */
/* Convert the SCR in microseconds. */
mtime_t
scr_time
;
mtime_t
scr_time
;
/* FIXME : this calculus is broken with MPEG-1 ! */
if
(
(
p_data
->
p_buffer
[
4
]
&
0xC0
)
==
0x40
)
scr_time
=
((
((
mtime_t
)(
p_data
->
p_buffer
[
4
]
&
0x38
)
<<
27
)
|
{
/* 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
[
4
]
&
0x3
)
<<
26
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
5
])
<<
20
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
5
])
<<
20
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0xF8
)
<<
12
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
6
]
&
0xF8
)
<<
12
)
|
...
@@ -733,7 +738,17 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
...
@@ -733,7 +738,17 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
((
mtime_t
)(
p_data
->
p_buffer
[
7
])
<<
5
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
7
])
<<
5
)
|
((
mtime_t
)(
p_data
->
p_buffer
[
8
]
&
0xF8
)
>>
3
)
((
mtime_t
)(
p_data
->
p_buffer
[
8
]
&
0xF8
)
>>
3
)
)
*
300
)
/
27
;
)
*
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. */
/* Call the pace control. */
CRDecode
(
p_input
,
NULL
,
scr_time
);
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