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
b4493aeb
Commit
b4493aeb
authored
Dec 20, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used VLC_TS_INVALID/0 in PS demuxer.
parent
0053da9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
15 deletions
+19
-15
modules/demux/ps.c
modules/demux/ps.c
+3
-3
modules/demux/ps.h
modules/demux/ps.h
+16
-12
No files found.
modules/demux/ps.c
View file @
b4493aeb
...
...
@@ -397,8 +397,8 @@ static int Demux( demux_t *p_demux )
p_sys
->
i_scr
=
-
1
;
}
if
(
p_sys
->
i_scr
>
0
)
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_sys
->
i_scr
);
if
(
p_sys
->
i_scr
>
=
0
)
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
VLC_TS_0
+
p_sys
->
i_scr
);
p_sys
->
i_scr
=
-
1
;
...
...
@@ -411,7 +411,7 @@ static int Demux( demux_t *p_demux )
{
if
(
!
b_new
&&
!
p_sys
->
b_have_pack
&&
(
tk
->
fmt
.
i_cat
==
AUDIO_ES
)
&&
(
p_pkt
->
i_pts
>
0
)
)
(
p_pkt
->
i_pts
>
VLC_TS_INVALID
)
)
{
/* A hack to sync the A/V on PES files. */
msg_Dbg
(
p_demux
,
"force SCR: %"
PRId64
,
p_pkt
->
i_pts
);
...
...
modules/demux/ps.h
View file @
b4493aeb
...
...
@@ -399,6 +399,8 @@ static inline int ps_pkt_parse_pes( block_t *p_pes, int i_skip_extra )
{
uint8_t
header
[
34
];
unsigned
int
i_skip
=
0
;
int64_t
i_pts
=
-
1
;
int64_t
i_dts
=
-
1
;
memcpy
(
header
,
p_pes
->
p_buffer
,
__MIN
(
p_pes
->
i_buffer
,
34
)
);
...
...
@@ -423,19 +425,19 @@ static inline int ps_pkt_parse_pes( block_t *p_pes, int i_skip_extra )
if
(
header
[
7
]
&
0x80
)
/* has pts */
{
p_pes
->
i_pts
=
((
mtime_t
)(
header
[
9
]
&
0x0e
)
<<
29
)
|
(
mtime_t
)(
header
[
10
]
<<
22
)
|
((
mtime_t
)(
header
[
11
]
&
0xfe
)
<<
14
)
|
(
mtime_t
)(
header
[
12
]
<<
7
)
|
(
mtime_t
)(
header
[
13
]
>>
1
);
i_pts
=
((
mtime_t
)(
header
[
9
]
&
0x0e
)
<<
29
)
|
(
mtime_t
)(
header
[
10
]
<<
22
)
|
((
mtime_t
)(
header
[
11
]
&
0xfe
)
<<
14
)
|
(
mtime_t
)(
header
[
12
]
<<
7
)
|
(
mtime_t
)(
header
[
13
]
>>
1
);
if
(
header
[
7
]
&
0x40
)
/* has dts */
{
p_pes
->
i_dts
=
((
mtime_t
)(
header
[
14
]
&
0x0e
)
<<
29
)
|
(
mtime_t
)(
header
[
15
]
<<
22
)
|
((
mtime_t
)(
header
[
16
]
&
0xfe
)
<<
14
)
|
(
mtime_t
)(
header
[
17
]
<<
7
)
|
(
mtime_t
)(
header
[
18
]
>>
1
);
i_dts
=
((
mtime_t
)(
header
[
14
]
&
0x0e
)
<<
29
)
|
(
mtime_t
)(
header
[
15
]
<<
22
)
|
((
mtime_t
)(
header
[
16
]
&
0xfe
)
<<
14
)
|
(
mtime_t
)(
header
[
17
]
<<
7
)
|
(
mtime_t
)(
header
[
18
]
>>
1
);
}
}
}
...
...
@@ -499,8 +501,10 @@ static inline int ps_pkt_parse_pes( block_t *p_pes, int i_skip_extra )
p_pes
->
p_buffer
+=
i_skip
;
p_pes
->
i_buffer
-=
i_skip
;
p_pes
->
i_dts
=
100
*
p_pes
->
i_dts
/
9
;
p_pes
->
i_pts
=
100
*
p_pes
->
i_pts
/
9
;
if
(
i_dts
>=
0
)
p_pes
->
i_dts
=
VLC_TS_0
+
100
*
i_dts
/
9
;
if
(
i_pts
>=
0
)
p_pes
->
i_pts
=
VLC_TS_0
+
100
*
i_pts
/
9
;
return
VLC_SUCCESS
;
}
...
...
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