Commit 8a2a5754 authored by Jean-Paul Saman's avatar Jean-Paul Saman

descriptors: fix wrong use of dvbpsi_DuplicateDecodedDescriptor()

Duplicating p_descriptor->p_decoded which has just been newly create is
wrong. The pointer is empty. What should have been done is duplicating
the pointer p_decoded which is passed to the generator function for the
descriptor.
parent ed908835
......@@ -123,7 +123,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_vstream_dr_t));
}
......
......@@ -102,7 +102,7 @@ dvbpsi_descriptor_t *dvbpsi_GenAStreamDr(dvbpsi_astream_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_astream_dr_t));
}
......
......@@ -100,7 +100,7 @@ dvbpsi_descriptor_t * dvbpsi_GenHierarchyDr(dvbpsi_hierarchy_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_hierarchy_dr_t));
}
......
......@@ -88,9 +88,8 @@ dvbpsi_registration_dr_t * dvbpsi_DecodeRegistrationDr(
/*****************************************************************************
* dvbpsi_GenRegistrationDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(
dvbpsi_registration_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(dvbpsi_registration_dr_t *p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -113,7 +112,7 @@ dvbpsi_descriptor_t * dvbpsi_GenRegistrationDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_registration_dr_t));
}
......
......@@ -91,7 +91,7 @@ dvbpsi_descriptor_t * dvbpsi_GenDSAlignmentDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_ds_alignment_dr_t));
}
......
......@@ -82,9 +82,8 @@ dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
/*****************************************************************************
* dvbpsi_GenTargetBgGridDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
dvbpsi_target_bg_grid_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(dvbpsi_target_bg_grid_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x07, 4, NULL);
......@@ -103,7 +102,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTargetBgGridDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_target_bg_grid_dr_t));
}
......
......@@ -102,7 +102,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVWindowDr(dvbpsi_vwindow_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_vwindow_dr_t));
}
......
......@@ -105,7 +105,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCADr(dvbpsi_ca_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_ca_dr_t));
}
......
......@@ -109,7 +109,7 @@ dvbpsi_descriptor_t * dvbpsi_GenISO639Dr(dvbpsi_iso639_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_iso639_dr_t));
}
......
......@@ -79,9 +79,8 @@ dvbpsi_system_clock_dr_t * dvbpsi_DecodeSystemClockDr(
/*****************************************************************************
* dvbpsi_GenSystemClockDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(
dvbpsi_system_clock_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(dvbpsi_system_clock_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -100,7 +99,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSystemClockDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_system_clock_dr_t));
}
......
......@@ -101,7 +101,7 @@ dvbpsi_descriptor_t * dvbpsi_GenMxBuffUtilizationDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_mx_buff_utilization_dr_t));
}
......
......@@ -86,9 +86,8 @@ dvbpsi_copyright_dr_t * dvbpsi_DecodeCopyrightDr(
/*****************************************************************************
* dvbpsi_GenCopyrightDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(
dvbpsi_copyright_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(dvbpsi_copyright_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -110,10 +109,9 @@ dvbpsi_descriptor_t * dvbpsi_GenCopyrightDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_copyright_dr_t));
}
return p_descriptor;
}
......@@ -78,9 +78,8 @@ dvbpsi_max_bitrate_dr_t * dvbpsi_DecodeMaxBitrateDr(
/*****************************************************************************
* dvbpsi_GenMaxBitrateDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(
dvbpsi_max_bitrate_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(dvbpsi_max_bitrate_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x0e, 3, NULL);
......@@ -96,7 +95,7 @@ dvbpsi_descriptor_t * dvbpsi_GenMaxBitrateDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_max_bitrate_dr_t));
}
......
......@@ -98,10 +98,9 @@ dvbpsi_descriptor_t * dvbpsi_GenPrivateDataDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_private_data_dr_t));
}
return p_descriptor;
}
......@@ -97,7 +97,7 @@ dvbpsi_descriptor_t * dvbpsi_GenNetworkNameDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_network_name_dr_t));
}
......
......@@ -112,7 +112,7 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceListDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_service_list_dr_t));
}
......
......@@ -79,9 +79,8 @@ dvbpsi_stuffing_dr_t * dvbpsi_DecodeStuffingDr(
/*****************************************************************************
* dvbpsi_GenStuffingDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(
dvbpsi_stuffing_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(dvbpsi_stuffing_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -99,10 +98,9 @@ dvbpsi_descriptor_t * dvbpsi_GenStuffingDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_stuffing_dr_t));
}
return p_descriptor;
}
......@@ -120,7 +120,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSatDelivSysDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_sat_deliv_sys_dr_t));
}
......
......@@ -86,7 +86,7 @@ dvbpsi_cable_deliv_sys_dr_t * dvbpsi_DecodeCableDelivSysDr(
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
dvbpsi_cable_deliv_sys_dr_t * p_decoded,
int b_duplicate)
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -111,7 +111,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_cable_deliv_sys_dr_t));
}
......
......@@ -86,7 +86,7 @@ dvbpsi_cable_deliv_sys_dr_t* dvbpsi_DecodeCableDelivSysDr(
*****************************************************************************/
/*!
* \fn dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
dvbpsi_cable_deliv_sys_dr_t * p_decoded, int b_duplicate)
dvbpsi_cable_deliv_sys_dr_t * p_decoded, bool b_duplicate)
* \brief cable delivery system descriptor generator.
* \param p_decoded pointer to a decoded cable delivery system descriptor
* descriptor structure
......@@ -96,7 +96,7 @@ dvbpsi_cable_deliv_sys_dr_t* dvbpsi_DecodeCableDelivSysDr(
*/
dvbpsi_descriptor_t * dvbpsi_GenCableDelivSysDr(
dvbpsi_cable_deliv_sys_dr_t * p_decoded,
int b_duplicate);
bool b_duplicate);
#ifdef __cplusplus
......
......@@ -100,9 +100,8 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
/*****************************************************************************
* dvbpsi_GenVBIDataDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
dvbpsi_vbi_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(dvbpsi_vbi_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -134,7 +133,7 @@ dvbpsi_descriptor_t * dvbpsi_GenVBIDataDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_vbi_dr_t));
}
......
......@@ -79,8 +79,7 @@ dvbpsi_bouquet_name_dr_t * dvbpsi_DecodeBouquetNameDr(
/*****************************************************************************
* dvbpsi_GenBouquetNameDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(
dvbpsi_bouquet_name_dr_t * p_decoded,
dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(dvbpsi_bouquet_name_dr_t *p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
......@@ -99,7 +98,7 @@ dvbpsi_descriptor_t * dvbpsi_GenBouquetNameDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_bouquet_name_dr_t));
}
......
......@@ -102,9 +102,8 @@ dvbpsi_service_dr_t * dvbpsi_DecodeServiceDr(
/*****************************************************************************
* dvbpsi_GenServiceDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
dvbpsi_service_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenServiceDr(dvbpsi_service_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -131,7 +130,7 @@ dvbpsi_descriptor_t * dvbpsi_GenServiceDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_service_dr_t));
}
......
......@@ -115,7 +115,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCountryAvailabilityDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_country_availability_dr_t));
}
......
......@@ -215,7 +215,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLinkageDr(dvbpsi_linkage_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_linkage_dr_t));
}
......
......@@ -116,7 +116,7 @@ dvbpsi_descriptor_t * dvbpsi_GenShortEventDr(dvbpsi_short_event_dr_t * p_decoded
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_short_event_dr_t));
}
......
......@@ -150,7 +150,7 @@ dvbpsi_descriptor_t * dvbpsi_GenExtendedEventDr(dvbpsi_extended_event_dr_t * p_d
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_extended_event_dr_t));
}
......
......@@ -91,7 +91,7 @@ dvbpsi_descriptor_t * dvbpsi_GenStreamIdentifierDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_stream_identifier_dr_t));
}
......
......@@ -116,10 +116,9 @@ dvbpsi_descriptor_t * dvbpsi_GenParentalRatingDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_parental_rating_dr_t));
}
return p_descriptor;
}
......@@ -96,9 +96,8 @@ dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
/*****************************************************************************
* dvbpsi_GenTeletextDr
*****************************************************************************/
dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(
dvbpsi_teletext_dr_t * p_decoded,
bool b_duplicate)
dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(dvbpsi_teletext_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor =
......@@ -125,7 +124,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTeletextDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_teletext_dr_t));
}
......
......@@ -138,7 +138,7 @@ dvbpsi_descriptor_t * dvbpsi_GenLocalTimeOffsetDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_local_time_offset_dr_t));
}
......
......@@ -136,7 +136,7 @@ dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_subtitling_dr_t));
}
......
......@@ -90,7 +90,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
dvbpsi_terr_deliv_sys_dr_t * p_decoded,
bool b_duplicate)
{
/* Create the descriptor */
/* Create the descriptor */
dvbpsi_descriptor_t * p_descriptor = dvbpsi_NewDescriptor(0x5a, 11, NULL);
if (!p_descriptor)
return NULL;
......@@ -121,7 +121,7 @@ dvbpsi_descriptor_t * dvbpsi_GenTerrDelivSysDr(
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_terr_deliv_sys_dr_t));
}
......
......@@ -101,7 +101,7 @@ dvbpsi_descriptor_t * dvbpsi_GenPDCDr(dvbpsi_PDC_dr_t * p_decoded,
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(p_decoded,
sizeof(dvbpsi_PDC_dr_t));
}
......
......@@ -299,8 +299,7 @@ dvbpsi_descriptor_t *dvbpsi_GenAACDr(dvbpsi_aac_dr_t *p_decoded, bool b_duplicat
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
sizeof(dvbpsi_aac_dr_t));
dvbpsi_DuplicateDecodedDescriptor(p_decoded, sizeof(dvbpsi_aac_dr_t));
}
return p_descriptor;
......
......@@ -96,7 +96,7 @@ dvbpsi_descriptor_t * dvbpsi_GenCUEIDr(dvbpsi_cuei_dr_t * p_decoded, bool b_dupl
{
/* Duplicate decoded data */
p_descriptor->p_decoded =
dvbpsi_DuplicateDecodedDescriptor(p_descriptor->p_decoded,
dvbpsi_DuplicateDecodedDescriptor(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