Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
77f33915
Commit
77f33915
authored
Mar 08, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update scrambled es state on change (TS).
parent
a9c070fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
modules/demux/ts.c
modules/demux/ts.c
+20
-0
No files found.
modules/demux/ts.c
View file @
77f33915
...
...
@@ -310,6 +310,7 @@ typedef struct
bool
b_seen
;
bool
b_valid
;
int
i_cc
;
/* countinuity counter */
bool
b_scrambled
;
/* PSI owner (ie PMT -> PAT, ES -> PMT */
ts_psi_t
*
p_owner
;
...
...
@@ -1507,6 +1508,7 @@ static void PIDInit( ts_pid_t *pid, bool b_psi, ts_psi_t *p_owner )
pid
->
b_valid
=
true
;
pid
->
i_cc
=
0xff
;
pid
->
b_scrambled
=
false
;
pid
->
p_owner
=
p_owner
;
pid
->
i_owner_number
=
0
;
...
...
@@ -1867,6 +1869,7 @@ static bool GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
{
const
uint8_t
*
p
=
p_bk
->
p_buffer
;
const
bool
b_unit_start
=
p
[
1
]
&
0x40
;
const
bool
b_scrambled
=
p
[
3
]
&
0x80
;
const
bool
b_adaptation
=
p
[
3
]
&
0x20
;
const
bool
b_payload
=
p
[
3
]
&
0x10
;
const
int
i_cc
=
p
[
3
]
&
0x0f
;
/* continuity counter */
...
...
@@ -1971,6 +1974,23 @@ static bool GatherPES( demux_t *p_demux, ts_pid_t *pid, block_t *p_bk )
return
i_ret
;
}
/* */
if
(
!
pid
->
b_scrambled
!=
!
b_scrambled
)
{
msg_Warn
(
p_demux
,
"scrambled state changed on pid %d (%d->%d)"
,
pid
->
i_pid
,
pid
->
b_scrambled
,
b_scrambled
);
pid
->
b_scrambled
=
b_scrambled
;
for
(
int
i
=
0
;
i
<
pid
->
i_extra_es
;
i
++
)
{
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_ES_SCRAMBLED_STATE
,
pid
->
extra_es
[
i
]
->
id
,
b_scrambled
);
}
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_ES_SCRAMBLED_STATE
,
pid
->
es
->
id
,
b_scrambled
);
}
/* We have to gather it */
p_bk
->
p_buffer
+=
i_skip
;
p_bk
->
i_buffer
-=
i_skip
;
...
...
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