Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
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
libdvbpsi
Commits
c0fe1c1b
Commit
c0fe1c1b
authored
Oct 26, 2005
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print backwards PCR
parent
c28a8201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
examples/decode_mpeg.c
examples/decode_mpeg.c
+13
-5
No files found.
examples/decode_mpeg.c
View file @
c0fe1c1b
...
...
@@ -496,7 +496,8 @@ int main(int i_argc, char* pa_argv[])
uint8_t
*
p_tmp
=
&
p_data
[
i
];
uint16_t
i_pid
=
((
uint16_t
)(
p_tmp
[
1
]
&
0x1f
)
<<
8
)
+
p_tmp
[
2
];
int
i_cc
=
(
p_tmp
[
3
]
&
0x0f
);
int
i_old_cc
;
int
i_old_cc
=
-
1
;
mtime_t
i_prev_pcr
=
0
;
/* 33 bits */
vlc_bool_t
b_adaptation
=
(
p_tmp
[
3
]
&
0x20
);
/* adaptation field */
vlc_bool_t
b_discontinuity_seen
=
VLC_FALSE
;
...
...
@@ -542,15 +543,20 @@ int main(int i_argc, char* pa_argv[])
if
(
b_pcr
&&
(
p_tmp
[
4
]
>=
7
)
)
{
mtime_t
i_pcr
;
/* 33 bits */
mtime_t
i_delta
=
0
;
i_pcr
=
(
(
mtime_t
)
p_tmp
[
6
]
<<
25
)
|
(
(
mtime_t
)
p_tmp
[
7
]
<<
17
)
|
(
(
mtime_t
)
p_tmp
[
8
]
<<
9
)
|
(
(
mtime_t
)
p_tmp
[
9
]
<<
1
)
|
(
(
mtime_t
)
p_tmp
[
10
]
>>
7
);
//printf( "New PCR pid %d delta %ld\n", i_pid, i_pcr - p_stream->pid[i_pid].i_pcr );
p_stream
->
pid
[
i_pid
].
i_pcr
=
i_pcr
;
//printf( "New PCR pid %d value %ld \n", i_pid, i_pcr );
i_prev_pcr
=
p_stream
->
pid
[
i_pid
].
i_pcr
;
p_stream
->
pid
[
i_pid
].
i_pcr
=
i_pcr
;
i_delta
=
p_stream
->
pid
[
i_pid
].
i_pcr
-
i_prev_pcr
;
if
(
i_delta
<
0
)
printf
(
"Backwards PCR %lld previous %lld, delta %lld
\n
"
,
(
long
long
int
)
p_stream
->
pid
[
i_pid
].
i_pcr
,
(
long
long
int
)
i_prev_pcr
,
(
long
long
int
)
i_delta
);
}
}
...
...
@@ -564,7 +570,9 @@ int main(int i_argc, char* pa_argv[])
if
(
b_discontinuity_indicator
)
{
if
(
b_pcr
)
printf
(
"New PCR pid %d value %lld
\n
"
,
i_pid
,
(
long
long
int
)
p_stream
->
pid
[
i_pid
].
i_pcr
);
printf
(
"New PCR pid %d value %lld (previous %lld, delta %lld)
\n
"
,
i_pid
,
(
long
long
int
)
p_stream
->
pid
[
i_pid
].
i_pcr
,
(
long
long
int
)
i_prev_pcr
,
(
long
long
int
)
p_stream
->
pid
[
i_pid
].
i_pcr
-
(
long
long
int
)
i_prev_pcr
);
if
(
b_discontinuity_seen
)
{
/* cc discontinuity is expected */
...
...
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