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
abdd7cf4
Commit
abdd7cf4
authored
Jun 24, 2011
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/dvbpsi.c: TDT carries no CRC_32
TDT carries no CRC_32, thus exclude it from validating CRC_32.
parent
d0ba55f6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
src/dvbpsi.c
src/dvbpsi.c
+2
-1
src/tables/tot.c
src/tables/tot.c
+4
-3
No files found.
src/dvbpsi.c
View file @
abdd7cf4
...
@@ -374,7 +374,8 @@ bool dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
...
@@ -374,7 +374,8 @@ bool dvbpsi_PushPacket(dvbpsi_t *handle, uint8_t* p_data)
if
(
p_section
->
b_syntax_indicator
)
if
(
p_section
->
b_syntax_indicator
)
p_section
->
p_payload_end
-=
4
;
p_section
->
p_payload_end
-=
4
;
if
(
p_section
->
p_data
[
0
]
!=
0x72
&&
dvbpsi_ValidPSISection
(
p_section
))
if
((
p_section
->
p_data
[
0
]
==
0x70
)
/* TDT (has no CRC 32) */
||
(
p_section
->
p_data
[
0
]
!=
0x72
&&
dvbpsi_ValidPSISection
(
p_section
)))
{
{
/* PSI section is valid */
/* PSI section is valid */
p_section
->
i_table_id
=
p_section
->
p_data
[
0
];
p_section
->
i_table_id
=
p_section
->
p_data
[
0
];
...
...
src/tables/tot.c
View file @
abdd7cf4
...
@@ -147,6 +147,7 @@ void dvbpsi_DetachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
...
@@ -147,6 +147,7 @@ void dvbpsi_DetachTOT(dvbpsi_t* p_dvbpsi, uint8_t i_table_id,
*****************************************************************************/
*****************************************************************************/
void
dvbpsi_InitTOT
(
dvbpsi_tot_t
*
p_tot
,
uint64_t
i_utc_time
)
void
dvbpsi_InitTOT
(
dvbpsi_tot_t
*
p_tot
,
uint64_t
i_utc_time
)
{
{
p_tot
->
i_crc
=
0
;
p_tot
->
i_utc_time
=
i_utc_time
;
p_tot
->
i_utc_time
=
i_utc_time
;
p_tot
->
p_first_descriptor
=
NULL
;
p_tot
->
p_first_descriptor
=
NULL
;
}
}
...
@@ -241,7 +242,7 @@ void dvbpsi_GatherTOTSections(dvbpsi_t* p_dvbpsi,
...
@@ -241,7 +242,7 @@ void dvbpsi_GatherTOTSections(dvbpsi_t* p_dvbpsi,
|
((
uint64_t
)
p_section
->
p_payload_start
[
3
]
<<
8
)
|
((
uint64_t
)
p_section
->
p_payload_start
[
3
]
<<
8
)
|
(
uint64_t
)
p_section
->
p_payload_start
[
4
]);
|
(
uint64_t
)
p_section
->
p_payload_start
[
4
]);
else
else
dvbpsi_error
(
p_dvbpsi
,
"TOT decoder"
,
"failed decoding section"
);
dvbpsi_error
(
p_dvbpsi
,
"TOT
/TDT
decoder"
,
"failed decoding section"
);
/* Decode the section */
/* Decode the section */
dvbpsi_DecodeTOTSections
(
p_dvbpsi
,
p_building_tot
,
p_section
);
dvbpsi_DecodeTOTSections
(
p_dvbpsi
,
p_building_tot
,
p_section
);
...
@@ -258,9 +259,9 @@ void dvbpsi_GatherTOTSections(dvbpsi_t* p_dvbpsi,
...
@@ -258,9 +259,9 @@ void dvbpsi_GatherTOTSections(dvbpsi_t* p_dvbpsi,
*****************************************************************************/
*****************************************************************************/
static
bool
dvbpsi_ValidTOTSection
(
dvbpsi_t
*
p_dvbpsi
,
dvbpsi_psi_section_t
*
p_section
)
static
bool
dvbpsi_ValidTOTSection
(
dvbpsi_t
*
p_dvbpsi
,
dvbpsi_psi_section_t
*
p_section
)
{
{
if
(
p_section
->
i_table_id
!=
0x73
)
if
(
p_section
->
i_table_id
==
0x70
)
{
{
/* A TDT always has a length of 5 bytes (which is only the UTC time) */
/* A TDT
(table_id 0x70)
always has a length of 5 bytes (which is only the UTC time) */
if
(
p_section
->
i_length
!=
5
)
if
(
p_section
->
i_length
!=
5
)
{
{
dvbpsi_error
(
p_dvbpsi
,
"TDT/TOT decoder"
,
dvbpsi_error
(
p_dvbpsi
,
"TDT/TOT decoder"
,
...
...
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