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
ea6adee5
Commit
ea6adee5
authored
Dec 22, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix parity
parent
cd657555
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/descriptors/dr_45.c
src/descriptors/dr_45.c
+5
-5
No files found.
src/descriptors/dr_45.c
View file @
ea6adee5
...
@@ -58,7 +58,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
...
@@ -58,7 +58,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
/* Don't decode twice */
/* Don't decode twice */
if
(
p_descriptor
->
p_decoded
)
if
(
p_descriptor
->
p_decoded
)
return
p_descriptor
->
p_decoded
;
return
p_descriptor
->
p_decoded
;
printf
(
"DECODING VBI_DATA DESCRIPTOR
\n
"
);
/* Decode data and check the length */
/* Decode data and check the length */
if
(
p_descriptor
->
i_length
<
3
)
if
(
p_descriptor
->
i_length
<
3
)
{
{
...
@@ -67,14 +67,14 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
...
@@ -67,14 +67,14 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
return
NULL
;
return
NULL
;
}
}
if
(
p_descriptor
->
i_length
%
3
)
if
(
p_descriptor
->
i_length
%
2
)
{
{
DVBPSI_ERROR_ARG
(
"dr_45 decoder"
,
"length not multiple of 3(%d)"
,
DVBPSI_ERROR_ARG
(
"dr_45 decoder"
,
"length not multiple of 3(%d)"
,
p_descriptor
->
i_length
);
p_descriptor
->
i_length
);
return
NULL
;
return
NULL
;
}
}
i_services_number
=
p_descriptor
->
i_length
/
3
;
i_services_number
=
p_descriptor
->
i_length
/
2
;
/* Allocate memory */
/* Allocate memory */
p_decoded
=
p_decoded
=
...
@@ -101,7 +101,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
...
@@ -101,7 +101,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
if
(
(
i_data_service_id
>=
0x01
)
&&
(
i_data_service_id
<=
0x07
)
)
if
(
(
i_data_service_id
>=
0x01
)
&&
(
i_data_service_id
<=
0x07
)
)
{
{
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_parity
=
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_parity
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
3
+
n
])
&
0x20
);
((
uint8_t
)(
(
p_descriptor
->
p_data
[
3
*
i
+
3
+
n
])
&
0x20
)
>>
5
);
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_line_offset
=
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_line_offset
=
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
3
+
n
])
&
0x1f
);
((
uint8_t
)(
p_descriptor
->
p_data
[
3
*
i
+
3
+
n
])
&
0x1f
);
}
}
...
@@ -143,7 +143,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
...
@@ -143,7 +143,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
(
p_decoded
->
p_services
[
i
].
i_data_service_id
<=
0x07
)
)
(
p_decoded
->
p_services
[
i
].
i_data_service_id
<=
0x07
)
)
{
{
p_descriptor
->
p_data
[
5
*
i
+
4
+
n
]
=
(
uint8_t
)
p_descriptor
->
p_data
[
5
*
i
+
4
+
n
]
=
(
uint8_t
)
(
((
uint8_t
)
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_parity
)
&
0x20
)
|
(
((
(
uint8_t
)
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_parity
)
&
0x20
)
<<
5
)
|
(
((
uint8_t
)
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_line_offset
)
&
0x1f
);
(
((
uint8_t
)
p_decoded
->
p_services
[
i
].
p_lines
[
n
].
i_line_offset
)
&
0x1f
);
}
}
else
p_descriptor
->
p_data
[
5
*
i
+
3
+
n
]
=
0xFF
;
/* Stuffing byte */
else
p_descriptor
->
p_data
[
5
*
i
+
3
+
n
]
=
0xFF
;
/* Stuffing byte */
...
...
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