Commit 4a7ee37e authored by Jean-Paul Saman's avatar Jean-Paul Saman

descriptors: add helper function dvbpsi_DuplicateDecodedDescriptor()

- update all descriptors.
parent fdae10cd
......@@ -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;
}
......@@ -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
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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;
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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;
}
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment