Commit f6de3f79 authored by Jean-Paul Saman's avatar Jean-Paul Saman

src/descriptors/*: Remove dvbpsi_error()

The descriptor structs have no reference to dvbpsi_h handle, so using
the dvbpsi_message_cb is currently impossible. Therefor remove the
dvbpsi_error() messages for now.
parent 72c8e6fa
......@@ -50,10 +50,7 @@ dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x02)
{
dvbpsi_error(h_dvbpsi, "dr_02 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -69,10 +66,7 @@ dvbpsi_vstream_dr_t * dvbpsi_DecodeVStreamDr(dvbpsi_descriptor_t * p_descriptor)
if( (!p_decoded->b_mpeg2 && (p_descriptor->i_length != 1))
|| (p_decoded->b_mpeg2 && (p_descriptor->i_length != 3)))
{
dvbpsi_error(h_dvbpsi, "dr_02 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......@@ -141,4 +135,3 @@ dvbpsi_descriptor_t * dvbpsi_GenVStreamDr(dvbpsi_vstream_dr_t * p_decoded,
return p_descriptor;
}
......@@ -50,10 +50,7 @@ dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x03)
{
dvbpsi_error(h_dvbpsi, "dr_03 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -66,8 +63,6 @@ dvbpsi_astream_dr_t * dvbpsi_DecodeAStreamDr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if(p_descriptor->i_length != 1)
{
dvbpsi_error(h_dvbpsi, "dr_03 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_hierarchy_dr_t * dvbpsi_DecodeHierarchyDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x04)
{
dvbpsi_error(h_dvbpsi, "dr_04 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -67,8 +64,6 @@ dvbpsi_hierarchy_dr_t * dvbpsi_DecodeHierarchyDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
dvbpsi_error(h_dvbpsi, "dr_04 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_registration_dr_t * dvbpsi_DecodeRegistrationDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x05)
{
dvbpsi_error(h_dvbpsi, "dr_05 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_registration_dr_t * dvbpsi_DecodeRegistrationDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 4)
{
dvbpsi_error(h_dvbpsi, "dr_05 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x06)
{
dvbpsi_error(h_dvbpsi, "dr_06 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_ds_alignment_dr_t * dvbpsi_DecodeDSAlignmentDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 1)
{
dvbpsi_error(h_dvbpsi, "dr_06 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x07)
{
dvbpsi_error(h_dvbpsi, "dr_07 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_target_bg_grid_dr_t * dvbpsi_DecodeTargetBgGridDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
dvbpsi_error(h_dvbpsi, "dr_07 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -50,10 +50,7 @@ dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x08)
{
dvbpsi_error(h_dvbpsi, "dr_08 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -66,8 +63,6 @@ dvbpsi_vwindow_dr_t * dvbpsi_DecodeVWindowDr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
dvbpsi_error(h_dvbpsi, "dr_08 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -50,10 +50,7 @@ dvbpsi_ca_dr_t * dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x09)
{
dvbpsi_error(h_dvbpsi, "dr_09 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -66,8 +63,6 @@ dvbpsi_ca_dr_t * dvbpsi_DecodeCADr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if(p_descriptor->i_length < 4)
{
dvbpsi_error(h_dvbpsi, "dr_09 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x0a)
{
dvbpsi_error(h_dvbpsi, "dr_0a decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -67,8 +64,6 @@ dvbpsi_iso639_dr_t * dvbpsi_DecodeISO639Dr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if((p_descriptor->i_length < 1) || (p_descriptor->i_length % 4 != 0))
{
dvbpsi_error(h_dvbpsi, "dr_0a decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_system_clock_dr_t * dvbpsi_DecodeSystemClockDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x0b)
{
dvbpsi_error(h_dvbpsi, "dr_0b decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_system_clock_dr_t * dvbpsi_DecodeSystemClockDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 2)
{
dvbpsi_error(h_dvbpsi, "dr_0b decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x0c)
{
dvbpsi_error(h_dvbpsi, "dr_0c decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_mx_buff_utilization_dr_t * dvbpsi_DecodeMxBuffUtilizationDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 3)
{
dvbpsi_error(h_dvbpsi, "dr_0c decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_copyright_dr_t * dvbpsi_DecodeCopyrightDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x0d)
{
dvbpsi_error(h_dvbpsi, "dr_0d decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_copyright_dr_t * dvbpsi_DecodeCopyrightDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 4)
{
dvbpsi_error(h_dvbpsi, "dr_0c decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_max_bitrate_dr_t * dvbpsi_DecodeMaxBitrateDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x0e)
{
dvbpsi_error(h_dvbpsi, "dr_0e decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -67,8 +64,6 @@ dvbpsi_max_bitrate_dr_t * dvbpsi_DecodeMaxBitrateDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 3)
{
dvbpsi_error(h_dvbpsi, "dr_0e decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -51,10 +51,7 @@ dvbpsi_private_data_dr_t * dvbpsi_DecodePrivateDataDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x0f)
{
dvbpsi_error(h_dvbpsi, "dr_0f decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -68,8 +65,6 @@ dvbpsi_private_data_dr_t * dvbpsi_DecodePrivateDataDr(
/* Decode data and check the length */
if(p_descriptor->i_length != 4)
{
dvbpsi_error(h_dvbpsi, "dr_0f decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -52,10 +52,7 @@ dvbpsi_stuffing_dr_t * dvbpsi_DecodeStuffingDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x42)
{
dvbpsi_error(h_dvbpsi, "dr_42 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -51,10 +51,7 @@ dvbpsi_sat_deliv_sys_dr_t * dvbpsi_DecodeSatDelivSysDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x43)
{
dvbpsi_error(h_dvbpsi, "dr_43 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -50,10 +50,7 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
/* Check the tag */
if( p_descriptor->i_tag != 0x45 )
{
dvbpsi_error(h_dvbpsi, "dr_45 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -61,18 +58,10 @@ dvbpsi_vbi_dr_t * dvbpsi_DecodeVBIDataDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 3)
{
dvbpsi_error(h_dvbpsi, "dr_45 decoder", "bad length (%d)",
p_descriptor->i_length);
return NULL;
}
if(p_descriptor->i_length % 2)
{
dvbpsi_error(h_dvbpsi, "dr_45 decoder", "length not multiple of 3(%d)",
p_descriptor->i_length);
return NULL;
}
i_services_number = p_descriptor->i_length / 2;
......
......@@ -52,10 +52,7 @@ dvbpsi_bouquet_name_dr_t * dvbpsi_DecodeBouquetNameDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x47)
{
dvbpsi_error(h_dvbpsi, "dr_47 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -52,10 +52,7 @@ dvbpsi_service_dr_t * dvbpsi_DecodeServiceDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x48)
{
dvbpsi_error(h_dvbpsi, "dr_48 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -69,8 +66,6 @@ dvbpsi_service_dr_t * dvbpsi_DecodeServiceDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 3)
{
dvbpsi_error(h_dvbpsi, "dr_07 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -52,18 +52,14 @@ dvbpsi_short_event_dr_t * dvbpsi_DecodeShortEventDr(dvbpsi_descriptor_t * p_desc
/* Check the tag */
if(p_descriptor->i_tag != 0x4d ||
p_descriptor->i_length < 5 )
{
dvbpsi_error(h_dvbpsi, "dr_4d decoder", "bad tag or corrupted(0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Check length */
i_len1 = p_descriptor->p_data[3];
i_len2 = p_descriptor->p_data[4+i_len1];
if( p_descriptor->i_length < 5 + i_len1 + i_len2 )
{
dvbpsi_error(h_dvbpsi, "dr_4d decoder", "invalid length/content (tag=0x%x)", p_descriptor->i_tag );
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -53,10 +53,7 @@ dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_t *
/* Check the tag */
if(p_descriptor->i_tag != 0x4e ||
p_descriptor->i_length < 6 )
{
dvbpsi_error(h_dvbpsi, "dr_4e decoder", "bad tag or corrupted(0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -66,7 +63,6 @@ dvbpsi_extended_event_dr_t * dvbpsi_DecodeExtendedEventDr(dvbpsi_descriptor_t *
p_decoded = malloc(sizeof(dvbpsi_extended_event_dr_t));
if(!p_decoded) return NULL;
/* Decode */
p_decoded->i_descriptor_number = (p_descriptor->p_data[0] >> 4)&0xf;
p_decoded->i_last_descriptor_number = p_descriptor->p_data[0]&0x0f;
......
......@@ -50,10 +50,7 @@ dvbpsi_stream_identifier_dr_t * dvbpsi_DecodeStreamIdentifierDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x52)
{
dvbpsi_error(h_dvbpsi, "dr_52 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -67,8 +64,6 @@ dvbpsi_stream_identifier_dr_t * dvbpsi_DecodeStreamIdentifierDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 1)
{
dvbpsi_error(h_dvbpsi, "dr_52 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -52,10 +52,7 @@ dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x55)
{
dvbpsi_error(h_dvbpsi, "dr_55 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -69,8 +66,6 @@ dvbpsi_parental_rating_dr_t * dvbpsi_DecodeParentalRatingDr(
/* Decode data and check the length */
if(p_descriptor->i_length % 4)
{
dvbpsi_error(h_dvbpsi, "dr_55 decoder", "length not multiple of 4 (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
......@@ -50,10 +50,7 @@ dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
/* Check the tag */
if( (p_descriptor->i_tag != 0x56) && (p_descriptor->i_tag != 0x46) )
{
dvbpsi_error(h_dvbpsi, "dr_46/56 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -61,18 +58,10 @@ dvbpsi_teletext_dr_t * dvbpsi_DecodeTeletextDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 3)
{
dvbpsi_error(h_dvbpsi, "dr_46/dr_56 decoder", "bad length (%d)",
p_descriptor->i_length);
return NULL;
}
if(p_descriptor->i_length % 5)
{
dvbpsi_error(h_dvbpsi, "dr_46/dr_56 decoder", "length not multiple of 5(%d)",
p_descriptor->i_length);
return NULL;
}
i_pages_number = p_descriptor->i_length / 5;
......
......@@ -53,10 +53,7 @@ dvbpsi_local_time_offset_dr_t * dvbpsi_DecodeLocalTimeOffsetDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x58)
{
dvbpsi_error(h_dvbpsi, "dr_58 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -53,10 +53,7 @@ dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x59)
{
dvbpsi_error(h_dvbpsi, "dr_59 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -70,16 +67,12 @@ dvbpsi_subtitling_dr_t * dvbpsi_DecodeSubtitlingDr(
/* Decode data and check the length */
if(p_descriptor->i_length < 3)
{
dvbpsi_error(h_dvbpsi, "dr_59 decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
if(p_descriptor->i_length % 8)
{
dvbpsi_error(h_dvbpsi, "dr_59 decoder", "length not multiple of 8 (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......@@ -161,4 +154,3 @@ dvbpsi_descriptor_t * dvbpsi_GenSubtitlingDr(
return p_descriptor;
}
......@@ -51,10 +51,7 @@ dvbpsi_terr_deliv_sys_dr_t * dvbpsi_DecodeTerrDelivSysDr(
/* Check the tag */
if(p_descriptor->i_tag != 0x5a)
{
dvbpsi_error(h_dvbpsi, "dr_5a decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......
......@@ -50,10 +50,7 @@ dvbpsi_PDC_dr_t * dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if(p_descriptor->i_tag != 0x69)
{
dvbpsi_error(h_dvbpsi, "dr_69 decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if(p_descriptor->p_decoded)
......@@ -61,11 +58,7 @@ dvbpsi_PDC_dr_t * dvbpsi_DecodePDCDr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if( p_descriptor->i_length != 3)
{
dvbpsi_error(h_dvbpsi, "dr_69 decoder", "bad length (%d)",
p_descriptor->i_length);
return NULL;
}
/* Allocate memory */
p_decoded = (dvbpsi_PDC_dr_t*)malloc(sizeof(dvbpsi_PDC_dr_t));
......
......@@ -48,10 +48,7 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor)
/* Check the tag */
if (p_descriptor->i_tag != 0x8a)
{
dvbpsi_error(h_dvbpsi, "dr_8a decoder", "bad tag (0x%x)", p_descriptor->i_tag);
return NULL;
}
/* Don't decode twice */
if (p_descriptor->p_decoded)
......@@ -64,8 +61,6 @@ dvbpsi_cuei_dr_t * dvbpsi_DecodeCUEIDr(dvbpsi_descriptor_t * p_descriptor)
/* Decode data and check the length */
if (p_descriptor->i_length == 0x01)
{
dvbpsi_error(h_dvbpsi, "dr_8a decoder", "bad length (%d)",
p_descriptor->i_length);
free(p_decoded);
return NULL;
}
......
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