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
d2dbd51f
Commit
d2dbd51f
authored
May 10, 2016
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SIS: rewrite (CID #147329, #147330)
parent
00500273
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
src/tables/sis.c
src/tables/sis.c
+15
-14
No files found.
src/tables/sis.c
View file @
d2dbd51f
...
...
@@ -439,16 +439,18 @@ static dvbpsi_sis_cmd_splice_insert_t *
p_cmd
->
b_duration_flag
=
(
p_data
[
5
]
&
0x20
);
p_cmd
->
b_splice_immediate_flag
=
(
p_data
[
5
]
&
0x10
);
uint16_t
i_needed
=
10
+
(
p_cmd
->
b_program_splice_flag
&&
!
p_cmd
->
b_splice_immediate_flag
)
?
1
:
(
p_cmd
->
b_duration_flag
?
5
:
0
);
if
(
i_length
<
i_needed
)
uint16_t
pos
=
6
;
uint16_t
i_needed
=
0
;
if
(
p_cmd
->
b_program_splice_flag
&&
!
p_cmd
->
b_splice_immediate_flag
)
i_needed
=
1
;
else
if
(
p_cmd
->
b_duration_flag
)
i_needed
=
5
;
if
(
pos
+
i_needed
>=
i_length
)
goto
error
;
uint16_t
pos
=
6
;
if
(
p_cmd
->
b_program_splice_flag
&&
!
p_cmd
->
b_splice_immediate_flag
)
{
i_needed
+=
5
;
if
(
i_length
<
i_needed
)
if
(
pos
+
5
>=
i_length
)
goto
error
;
/* splice_time () */
...
...
@@ -468,17 +470,16 @@ static dvbpsi_sis_cmd_splice_insert_t *
}
if
(
!
p_cmd
->
b_program_splice_flag
)
{
if
(
p_data
[
pos
]
*
2
+
pos
>
i_length
-
pos
)
i_needed
=
1
;
if
(
!
p_cmd
->
b_splice_immediate_flag
)
i_needed
+=
p_data
[
pos
]
*
6
;
else
i_needed
+=
p_data
[
pos
];
if
(
i_needed
+
pos
>+
i_length
)
goto
error
;
p_cmd
->
i_component_count
=
p_data
[
pos
];
i_needed
+=
(
!
p_cmd
->
b_splice_immediate_flag
)
?
(
p_cmd
->
i_component_count
*
(
5
+
1
)
)
:
(
p_cmd
->
i_component_count
*
1
);
if
(
i_length
<
i_needed
)
goto
error
;
dvbpsi_sis_component_splice_time_t
*
p_last
=
p_cmd
->
p_splice_time
;
for
(
uint8_t
i
=
0
;
i
<
p_cmd
->
i_component_count
;
i
++
)
{
dvbpsi_sis_component_splice_time_t
*
p_splice_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