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
769fd3de
Commit
769fd3de
authored
Mar 18, 2014
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descriptors/dr_45.c: Remove unnecessary checks.
parent
73e240e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
src/descriptors/dr_45.c
src/descriptors/dr_45.c
+7
-11
No files found.
src/descriptors/dr_45.c
View file @
769fd3de
...
@@ -62,7 +62,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
...
@@ -62,7 +62,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
/* */
/* */
dvbpsi_vbi_dr_t
*
p_decoded
;
dvbpsi_vbi_dr_t
*
p_decoded
;
in
t
i_services_number
=
p_descriptor
->
i_length
/
2
;
uint8_
t
i_services_number
=
p_descriptor
->
i_length
/
2
;
if
(
i_services_number
>
DVBPSI_VBI_DR_MAX
)
if
(
i_services_number
>
DVBPSI_VBI_DR_MAX
)
i_services_number
=
DVBPSI_VBI_DR_MAX
;
i_services_number
=
DVBPSI_VBI_DR_MAX
;
...
@@ -73,18 +73,17 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
...
@@ -73,18 +73,17 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
p_decoded
->
i_services_number
=
i_services_number
;
p_decoded
->
i_services_number
=
i_services_number
;
for
(
in
t
i
=
0
;
i
<
i_services_number
;
i
++
)
for
(
uint8_
t
i
=
0
;
i
<
i_services_number
;
i
++
)
{
{
in
t
i_lines
=
0
,
i_data_service_id
;
uint8_
t
i_lines
=
0
,
i_data_service_id
;
i_data_service_id
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
2
+
i_lines
]));
i_data_service_id
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
2
+
i_lines
]));
p_decoded
->
p_services
[
i
].
i_data_service_id
=
i_data_service_id
;
p_decoded
->
p_services
[
i
].
i_data_service_id
=
i_data_service_id
;
i_lines
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
3
]));
i_lines
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
3
]));
if
(
i_lines
>
DVBPSI_VBIDATA_LINE_DR_MAX
)
i_lines
=
DVBPSI_VBIDATA_LINE_DR_MAX
;
p_decoded
->
p_services
[
i
].
i_lines
=
i_lines
;
p_decoded
->
p_services
[
i
].
i_lines
=
i_lines
;
for
(
int
n
=
0
;
n
<
i_lines
;
n
++
)
for
(
uint8_t
n
=
0
;
n
<
i_lines
;
n
++
)
{
{
if
(
(
i_data_service_id
>=
0x01
)
&&
(
i_data_service_id
<=
0x07
)
)
if
(
(
i_data_service_id
>=
0x01
)
&&
(
i_data_service_id
<=
0x07
)
)
{
{
...
@@ -117,16 +116,13 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded,
...
@@ -117,16 +116,13 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded,
return
NULL
;
return
NULL
;
/* Encode data */
/* Encode data */
for
(
int
i
=
0
;
i
<
p_decoded
->
i_services_number
;
i
++
)
for
(
uint8_t
i
=
0
;
i
<
p_decoded
->
i_services_number
;
i
++
)
{
{
p_descriptor
->
p_data
[
5
*
i
+
3
]
=
p_descriptor
->
p_data
[
5
*
i
+
3
]
=
(
(
uint8_t
)
p_decoded
->
p_services
[
i
].
i_data_service_id
);
(
(
uint8_t
)
p_decoded
->
p_services
[
i
].
i_data_service_id
);
if
(
p_decoded
->
p_services
[
i
].
i_lines
>
DVBPSI_VBIDATA_LINE_DR_MAX
)
p_decoded
->
p_services
[
i
].
i_lines
=
DVBPSI_VBIDATA_LINE_DR_MAX
;
p_descriptor
->
p_data
[
5
*
i
+
4
]
=
p_decoded
->
p_services
[
i
].
i_lines
;
p_descriptor
->
p_data
[
5
*
i
+
4
]
=
p_decoded
->
p_services
[
i
].
i_lines
;
for
(
in
t
n
=
0
;
n
<
p_decoded
->
p_services
[
i
].
i_lines
;
n
++
)
for
(
uint8_
t
n
=
0
;
n
<
p_decoded
->
p_services
[
i
].
i_lines
;
n
++
)
{
{
if
(
(
p_decoded
->
p_services
[
i
].
i_data_service_id
>=
0x01
)
&&
if
(
(
p_decoded
->
p_services
[
i
].
i_data_service_id
>=
0x01
)
&&
(
p_decoded
->
p_services
[
i
].
i_data_service_id
<=
0x07
)
)
(
p_decoded
->
p_services
[
i
].
i_data_service_id
<=
0x07
)
)
...
...
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