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
4a7ee37e
Commit
4a7ee37e
authored
May 21, 2012
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
descriptors: add helper function dvbpsi_DuplicateDecodedDescriptor()
- update all descriptors.
parent
fdae10cd
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
139 additions
and
205 deletions
+139
-205
src/descriptor.c
src/descriptor.c
+16
-0
src/descriptor.h
src/descriptor.h
+12
-0
src/descriptors/dr_02.c
src/descriptors/dr_02.c
+3
-6
src/descriptors/dr_03.c
src/descriptors/dr_03.c
+4
-7
src/descriptors/dr_04.c
src/descriptors/dr_04.c
+4
-7
src/descriptors/dr_05.c
src/descriptors/dr_05.c
+3
-6
src/descriptors/dr_07.c
src/descriptors/dr_07.c
+4
-7
src/descriptors/dr_08.c
src/descriptors/dr_08.c
+4
-7
src/descriptors/dr_09.c
src/descriptors/dr_09.c
+4
-7
src/descriptors/dr_0a.c
src/descriptors/dr_0a.c
+4
-7
src/descriptors/dr_0b.c
src/descriptors/dr_0b.c
+4
-7
src/descriptors/dr_0c.c
src/descriptors/dr_0c.c
+3
-9
src/descriptors/dr_0d.c
src/descriptors/dr_0d.c
+4
-7
src/descriptors/dr_0e.c
src/descriptors/dr_0e.c
+3
-6
src/descriptors/dr_0f.c
src/descriptors/dr_0f.c
+3
-6
src/descriptors/dr_40.c
src/descriptors/dr_40.c
+3
-6
src/descriptors/dr_42.c
src/descriptors/dr_42.c
+4
-7
src/descriptors/dr_43.c
src/descriptors/dr_43.c
+3
-6
src/descriptors/dr_44.c
src/descriptors/dr_44.c
+4
-7
src/descriptors/dr_45.c
src/descriptors/dr_45.c
+4
-7
src/descriptors/dr_47.c
src/descriptors/dr_47.c
+4
-8
src/descriptors/dr_48.c
src/descriptors/dr_48.c
+4
-7
src/descriptors/dr_4d.c
src/descriptors/dr_4d.c
+4
-7
src/descriptors/dr_4e.c
src/descriptors/dr_4e.c
+4
-7
src/descriptors/dr_52.c
src/descriptors/dr_52.c
+3
-6
src/descriptors/dr_55.c
src/descriptors/dr_55.c
+4
-7
src/descriptors/dr_56.c
src/descriptors/dr_56.c
+4
-7
src/descriptors/dr_58.c
src/descriptors/dr_58.c
+4
-7
src/descriptors/dr_59.c
src/descriptors/dr_59.c
+4
-7
src/descriptors/dr_5a.c
src/descriptors/dr_5a.c
+4
-7
src/descriptors/dr_69.c
src/descriptors/dr_69.c
+4
-7
src/descriptors/dr_8a.c
src/descriptors/dr_8a.c
+3
-6
No files found.
src/descriptor.c
View file @
4a7ee37e
...
...
@@ -129,3 +129,19 @@ void dvbpsi_DeleteDescriptors(dvbpsi_descriptor_t* p_descriptor)
p_descriptor
=
p_next
;
}
}
/*****************************************************************************
* dvbpsi_DuplicateDecodedDescriptor
*****************************************************************************
* Destruction of a dvbpsi_descriptor_t structure.
*****************************************************************************/
void
*
dvbpsi_DuplicateDecodedDescriptor
(
void
*
p_decoded
,
ssize_t
i_size
)
{
if
(
!
p_decoded
)
return
NULL
;
void
*
p_duplicate
=
calloc
(
1
,
i_size
);
if
(
p_duplicate
)
memcpy
(
p_duplicate
,
p_decoded
,
i_size
);
return
p_duplicate
;
}
src/descriptor.h
View file @
4a7ee37e
...
...
@@ -119,6 +119,18 @@ bool dvbpsi_CanDecodeAsDescriptor(dvbpsi_descriptor_t *p_descriptor, const uint8
*/
bool
dvbpsi_IsDescriptorDecoded
(
dvbpsi_descriptor_t
*
p_descriptor
);
/*****************************************************************************
* dvbpsi_DuplicateDecodedDescriptor
*****************************************************************************/
/*!
* \fn void *dvbpsi_DuplicateDecodedDescriptor(void *p_decoded, ssize_t i_size);
* \brief Duplicate a decoded descriptor. The caller is responsible for releasing the associated memory..
* \param p_decoded pointer to decoded descriptor obatained with dvbpsi_Decode* function
* \param i_size the sizeof decoded descriptor
* \return pointer to duplicated descriptor, NULL on error.
*/
void
*
dvbpsi_DuplicateDecodedDescriptor
(
void
*
p_decoded
,
ssize_t
i_size
);
#ifdef __cplusplus
};
#endif
...
...
src/descriptors/dr_02.c
View file @
4a7ee37e
...
...
@@ -122,12 +122,9 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_vstream_dr_t
*
p_dup_decoded
=
(
dvbpsi_vstream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_vstream_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_vstream_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_vstream_dr_t
));
}
}
...
...
src/descriptors/dr_03.c
View file @
4a7ee37e
...
...
@@ -100,13 +100,10 @@ dvbpsi_descriptor_t * dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_astream_dr_t
*
p_dup_decoded
=
(
dvbpsi_astream_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_astream_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_astream_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_astream_dr_t
));
}
}
...
...
src/descriptors/dr_04.c
View file @
4a7ee37e
...
...
@@ -98,13 +98,10 @@ dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(dvbpsi_hierarchy_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_hierarchy_dr_t
*
p_dup_decoded
=
(
dvbpsi_hierarchy_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_hierarchy_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_hierarchy_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_hierarchy_dr_t
));
}
}
...
...
src/descriptors/dr_05.c
View file @
4a7ee37e
...
...
@@ -111,12 +111,9 @@ dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_registration_dr_t
*
p_dup_decoded
=
(
dvbpsi_registration_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_registration_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_registration_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_registration_dr_t
));
}
}
...
...
src/descriptors/dr_07.c
View file @
4a7ee37e
...
...
@@ -105,13 +105,10 @@ dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_target_bg_grid_dr_t
*
p_dup_decoded
=
(
dvbpsi_target_bg_grid_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_target_bg_grid_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_target_bg_grid_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_target_bg_grid_dr_t
));
}
}
...
...
src/descriptors/dr_08.c
View file @
4a7ee37e
...
...
@@ -102,13 +102,10 @@ dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_vwindow_dr_t
*
p_dup_decoded
=
(
dvbpsi_vwindow_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_vwindow_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_vwindow_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_vwindow_dr_t
));
}
}
...
...
src/descriptors/dr_09.c
View file @
4a7ee37e
...
...
@@ -107,13 +107,10 @@ dvbpsi_descriptor_t * dvbpsi_GenCADr(dvbpsi_ca_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_ca_dr_t
*
p_dup_decoded
=
(
dvbpsi_ca_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_ca_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_ca_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_ca_dr_t
));
}
}
...
...
src/descriptors/dr_0a.c
View file @
4a7ee37e
...
...
@@ -106,13 +106,10 @@ dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded,
}
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_iso639_dr_t
*
p_dup_decoded
=
(
dvbpsi_iso639_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_iso639_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_iso639_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_iso639_dr_t
));
}
}
...
...
src/descriptors/dr_0b.c
View file @
4a7ee37e
...
...
@@ -101,13 +101,10 @@ dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_system_clock_dr_t
*
p_dup_decoded
=
(
dvbpsi_system_clock_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_system_clock_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_system_clock_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_system_clock_dr_t
));
}
}
...
...
src/descriptors/dr_0c.c
View file @
4a7ee37e
...
...
@@ -104,15 +104,9 @@ dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_mx_buff_utilization_dr_t
*
p_dup_decoded
=
(
dvbpsi_mx_buff_utilization_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_mx_buff_utilization_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_mx_buff_utilization_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_mx_buff_utilization_dr_t
));
}
}
...
...
src/descriptors/dr_0d.c
View file @
4a7ee37e
...
...
@@ -111,13 +111,10 @@ dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_copyright_dr_t
*
p_dup_decoded
=
(
dvbpsi_copyright_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_copyright_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_copyright_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_copyright_dr_t
));
}
}
...
...
src/descriptors/dr_0e.c
View file @
4a7ee37e
...
...
@@ -100,12 +100,9 @@ dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_max_bitrate_dr_t
*
p_dup_decoded
=
(
dvbpsi_max_bitrate_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_max_bitrate_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_max_bitrate_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_max_bitrate_dr_t
));
}
}
...
...
src/descriptors/dr_0f.c
View file @
4a7ee37e
...
...
@@ -102,12 +102,9 @@ dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_private_data_dr_t
*
p_dup_decoded
=
(
dvbpsi_private_data_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_private_data_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_private_data_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_private_data_dr_t
));
}
}
...
...
src/descriptors/dr_40.c
View file @
4a7ee37e
...
...
@@ -97,12 +97,9 @@ dvbpsi_descriptor_t * dvbpsi_GenNetworkNameDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_network_name_dr_t
*
p_dup_decoded
=
(
dvbpsi_network_name_dr_t
*
)
calloc
(
1
,
sizeof
(
dvbpsi_network_name_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_network_name_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_network_name_dr_t
));
}
return
p_descriptor
;
...
...
src/descriptors/dr_42.c
View file @
4a7ee37e
...
...
@@ -97,13 +97,10 @@ dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_stuffing_dr_t
*
p_dup_decoded
=
(
dvbpsi_stuffing_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_stuffing_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_stuffing_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_stuffing_dr_t
));
}
}
...
...
src/descriptors/dr_43.c
View file @
4a7ee37e
...
...
@@ -120,12 +120,9 @@ dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_sat_deliv_sys_dr_t
*
p_dup_decoded
=
(
dvbpsi_sat_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_sat_deliv_sys_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_sat_deliv_sys_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_sat_deliv_sys_dr_t
));
}
}
...
...
src/descriptors/dr_44.c
View file @
4a7ee37e
...
...
@@ -109,13 +109,10 @@ dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_cable_deliv_sys_dr_t
*
p_dup_decoded
=
(
dvbpsi_cable_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_cable_deliv_sys_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_cable_deliv_sys_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_cable_deliv_sys_dr_t
));
}
}
...
...
src/descriptors/dr_45.c
View file @
4a7ee37e
...
...
@@ -138,13 +138,10 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_vbi_dr_t
*
p_dup_decoded
=
(
dvbpsi_vbi_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_vbi_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_vbi_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_vbi_dr_t
));
}
}
...
...
src/descriptors/dr_47.c
View file @
4a7ee37e
...
...
@@ -97,16 +97,12 @@ dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_bouquet_name_dr_t
*
p_dup_decoded
=
(
dvbpsi_bouquet_name_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_bouquet_name_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_bouquet_name_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_bouquet_name_dr_t
));
}
}
return
p_descriptor
;
}
src/descriptors/dr_48.c
View file @
4a7ee37e
...
...
@@ -135,13 +135,10 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_service_dr_t
*
p_dup_decoded
=
(
dvbpsi_service_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_service_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_service_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_service_dr_t
));
}
}
...
...
src/descriptors/dr_4d.c
View file @
4a7ee37e
...
...
@@ -114,13 +114,10 @@ dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_decoded
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_short_event_dr_t
*
p_dup_decoded
=
(
dvbpsi_short_event_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_short_event_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_short_event_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_short_event_dr_t
));
}
}
...
...
src/descriptors/dr_4e.c
View file @
4a7ee37e
...
...
@@ -148,13 +148,10 @@ dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_d
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_extended_event_dr_t
*
p_dup_decoded
=
(
dvbpsi_extended_event_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_extended_event_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_extended_event_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_extended_event_dr_t
));
}
}
...
...
src/descriptors/dr_52.c
View file @
4a7ee37e
...
...
@@ -95,12 +95,9 @@ dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_stream_identifier_dr_t
*
p_dup_decoded
=
(
dvbpsi_stream_identifier_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_stream_identifier_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_stream_identifier_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_stream_identifier_dr_t
));
}
}
...
...
src/descriptors/dr_55.c
View file @
4a7ee37e
...
...
@@ -121,13 +121,10 @@ dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_parental_rating_dr_t
*
p_dup_decoded
=
(
dvbpsi_parental_rating_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_parental_rating_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_parental_rating_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_parental_rating_dr_t
));
}
}
...
...
src/descriptors/dr_56.c
View file @
4a7ee37e
...
...
@@ -126,13 +126,10 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_teletext_dr_t
*
p_dup_decoded
=
(
dvbpsi_teletext_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_teletext_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_teletext_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_teletext_dr_t
));
}
}
...
...
src/descriptors/dr_58.c
View file @
4a7ee37e
...
...
@@ -137,13 +137,10 @@ dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_local_time_offset_dr_t
*
p_dup_decoded
=
(
dvbpsi_local_time_offset_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_local_time_offset_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_local_time_offset_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_local_time_offset_dr_t
));
}
}
...
...
src/descriptors/dr_59.c
View file @
4a7ee37e
...
...
@@ -146,13 +146,10 @@ dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_subtitling_dr_t
*
p_dup_decoded
=
(
dvbpsi_subtitling_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_subtitling_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_subtitling_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_subtitling_dr_t
));
}
}
...
...
src/descriptors/dr_5a.c
View file @
4a7ee37e
...
...
@@ -122,13 +122,10 @@ dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_terr_deliv_sys_dr_t
*
p_dup_decoded
=
(
dvbpsi_terr_deliv_sys_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_terr_deliv_sys_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_terr_deliv_sys_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_terr_deliv_sys_dr_t
));
}
}
...
...
src/descriptors/dr_69.c
View file @
4a7ee37e
...
...
@@ -98,13 +98,10 @@ dvbpsi_descriptor_t * dvbpsi_GenPDCDr(dvbpsi_PDC_dr_t * p_decoded,
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_PDC_dr_t
*
p_dup_decoded
=
(
dvbpsi_PDC_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_PDC_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_PDC_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
/* Duplicate decoded data */
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_PDC_dr_t
));
}
}
...
...
src/descriptors/dr_8a.c
View file @
4a7ee37e
...
...
@@ -100,12 +100,9 @@ dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(dvbpsi_cuei_dr_t * p_decoded, bool b_dupl
if
(
b_duplicate
)
{
/* Duplicate decoded data */
dvbpsi_cuei_dr_t
*
p_dup_decoded
=
(
dvbpsi_cuei_dr_t
*
)
malloc
(
sizeof
(
dvbpsi_cuei_dr_t
));
if
(
p_dup_decoded
)
memcpy
(
p_dup_decoded
,
p_decoded
,
sizeof
(
dvbpsi_cuei_dr_t
));
p_descriptor
->
p_decoded
=
(
void
*
)
p_dup_decoded
;
p_descriptor
->
p_decoded
=
dvbpsi_DuplicateDecodedDescriptor
(
p_descriptor
->
p_decoded
,
sizeof
(
dvbpsi_cuei_dr_t
));
}
}
...
...
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