Fix warnings with gcc 4.0.1.

This commit is contained in:
Alessandro Decina 2009-09-23 12:32:54 +02:00
parent 9c155f10f3
commit a17393fd34
8 changed files with 30 additions and 26 deletions

View file

@ -338,7 +338,7 @@ adpcmdec_decode_ima_block (ADPCMDec * dec, int n_samples, guint8 * data,
for (channel = 0; channel < dec->channels; channel++) { for (channel = 0; channel < dec->channels; channel++) {
samples[channel] = read_sample (data + channel * 4); samples[channel] = read_sample (data + channel * 4);
stepindex[channel] = CLAMP (data[channel * 4 + 2], 0, 88); stepindex[channel] = MIN (data[channel * 4 + 2], 88);
if (data[channel * 4 + 3] != 0) { if (data[channel * 4 + 3] != 0) {
GST_WARNING_OBJECT (dec, "Synchronisation error"); GST_WARNING_OBJECT (dec, "Synchronisation error");

View file

@ -442,10 +442,10 @@ gst_asf_parse_mult_payload (GstByteReader * reader, gboolean * has_keyframe)
{ {
guint payloads; guint payloads;
guint8 payload_len_type; guint8 payload_len_type;
guint8 rep_data_len; guint8 rep_data_len = 0;
guint32 payload_len; guint32 payload_len;
guint8 stream_num; guint8 stream_num = 0;
guint8 aux; guint8 aux = 0;
guint i; guint i;
if (!gst_byte_reader_get_uint8 (reader, &aux)) if (!gst_byte_reader_get_uint8 (reader, &aux))
@ -504,7 +504,7 @@ error:
static gboolean static gboolean
gst_asf_parse_single_payload (GstByteReader * reader, gboolean * has_keyframe) gst_asf_parse_single_payload (GstByteReader * reader, gboolean * has_keyframe)
{ {
guint8 stream_num; guint8 stream_num = 0;
if (!gst_byte_reader_get_uint8 (reader, &stream_num)) if (!gst_byte_reader_get_uint8 (reader, &stream_num))
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
*has_keyframe = (stream_num & 0x80) != 0; *has_keyframe = (stream_num & 0x80) != 0;
@ -520,9 +520,9 @@ gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet,
{ {
GstByteReader *reader; GstByteReader *reader;
gboolean ret = TRUE; gboolean ret = TRUE;
guint8 first; guint8 first = 0;
guint8 err_length = 0; /* length of the error fields */ guint8 err_length = 0; /* length of the error fields */
guint8 aux; guint8 aux = 0;
guint8 packet_len_type; guint8 packet_len_type;
guint8 padding_len_type; guint8 padding_len_type;
guint8 seq_len_type; guint8 seq_len_type;
@ -532,8 +532,8 @@ gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet,
gboolean mult_payloads; gboolean mult_payloads;
guint32 packet_len; guint32 packet_len;
guint32 padd_len; guint32 padd_len;
guint32 send_time; guint32 send_time = 0;
guint16 duration; guint16 duration = 0;
gboolean has_keyframe; gboolean has_keyframe;
reader = gst_byte_reader_new_from_buffer (buffer); reader = gst_byte_reader_new_from_buffer (buffer);
@ -657,10 +657,10 @@ static gboolean
gst_asf_parse_file_properties_obj (GstByteReader * reader, gst_asf_parse_file_properties_obj (GstByteReader * reader,
GstAsfFileInfo * asfinfo) GstAsfFileInfo * asfinfo)
{ {
guint32 min_ps; guint32 min_ps = 0;
guint32 max_ps; guint32 max_ps = 0;
guint64 packets; guint64 packets = 0;
guint32 flags; guint32 flags = 0;
GST_DEBUG ("ASF: Parsing file properties object"); GST_DEBUG ("ASF: Parsing file properties object");
/* skip until data packets count */ /* skip until data packets count */
@ -703,7 +703,7 @@ gboolean
gst_asf_parse_headers (GstBuffer * buffer, GstAsfFileInfo * file_info) gst_asf_parse_headers (GstBuffer * buffer, GstAsfFileInfo * file_info)
{ {
gboolean ret = TRUE; gboolean ret = TRUE;
guint32 header_objects; guint32 header_objects = 0;
guint32 i; guint32 i;
GstByteReader *reader; GstByteReader *reader;
guint64 object_size; guint64 object_size;
@ -731,7 +731,7 @@ gst_asf_parse_headers (GstBuffer * buffer, GstAsfFileInfo * file_info)
/* iterate through childs of header object */ /* iterate through childs of header object */
for (i = 0; i < header_objects; i++) { for (i = 0; i < header_objects; i++) {
const guint8 *guid = NULL; const guint8 *guid = NULL;
guint64 obj_size; guint64 obj_size = 0;
if (!gst_byte_reader_get_data (reader, ASF_GUID_SIZE, &guid)) if (!gst_byte_reader_get_data (reader, ASF_GUID_SIZE, &guid))
goto error; goto error;
if (!gst_byte_reader_get_uint64_le (reader, &obj_size)) if (!gst_byte_reader_get_uint64_le (reader, &obj_size))

View file

@ -107,7 +107,7 @@ gst_asf_parse_parse_data_object (GstAsfParse * asfparse, GstBuffer * buffer)
{ {
GstByteReader *reader; GstByteReader *reader;
GstFlowReturn ret = GST_FLOW_OK; GstFlowReturn ret = GST_FLOW_OK;
guint64 packet_count; guint64 packet_count = 0;
GST_DEBUG_OBJECT (asfparse, "Parsing data object"); GST_DEBUG_OBJECT (asfparse, "Parsing data object");

View file

@ -442,8 +442,9 @@ gst_sps_decode_vui (GstH264Parse * h, GstNalBs * bs)
sps->pic_struct_present_flag = gst_nal_bs_read (bs, 1); sps->pic_struct_present_flag = gst_nal_bs_read (bs, 1);
#if 0
/* Not going down anymore */ /* Not going down anymore */
return TRUE;
if (gst_nal_bs_read (bs, 1)) { /* bitstream_restriction_flag */ if (gst_nal_bs_read (bs, 1)) { /* bitstream_restriction_flag */
gst_nal_bs_read (bs, 1); /* motion_vectors_over_pic_boundaries_flag */ gst_nal_bs_read (bs, 1); /* motion_vectors_over_pic_boundaries_flag */
@ -454,6 +455,9 @@ gst_sps_decode_vui (GstH264Parse * h, GstNalBs * bs)
gst_nal_bs_read_ue (bs); /* num_reorder_frames */ gst_nal_bs_read_ue (bs); /* num_reorder_frames */
gst_nal_bs_read_ue (bs); /* max_dec_frame_buffering */ gst_nal_bs_read_ue (bs); /* max_dec_frame_buffering */
} }
#endif
return TRUE;
} }
/* decode sequential parameter sets */ /* decode sequential parameter sets */

View file

@ -2901,7 +2901,7 @@ is_mpegts_sync (const guint8 * in_data, const guint8 * end_data,
static inline void static inline void
gst_mpegts_demux_detect_packet_size (GstMpegTSDemux * demux, guint len) gst_mpegts_demux_detect_packet_size (GstMpegTSDemux * demux, guint len)
{ {
guint i, packetsize; guint i, packetsize = 0;
for (i = 1; i < len; i++) { for (i = 1; i < len; i++) {
packetsize = demux->sync_lut[i] - demux->sync_lut[i - 1]; packetsize = demux->sync_lut[i] - demux->sync_lut[i - 1];

View file

@ -438,7 +438,7 @@ mxf_mpeg_is_mpeg2_keyframe (GstBuffer * buffer)
while (gst_byte_reader_get_remaining (&reader) > 3) { while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) { if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) {
guint8 type; guint8 type = 0;
/* Found sync code */ /* Found sync code */
gst_byte_reader_skip (&reader, 3); gst_byte_reader_skip (&reader, 3);
@ -450,7 +450,7 @@ mxf_mpeg_is_mpeg2_keyframe (GstBuffer * buffer)
if (type == 0xb8) { if (type == 0xb8) {
return TRUE; return TRUE;
} else if (type == 0x00) { } else if (type == 0x00) {
guint8 pic_type; guint8 pic_type = 0;
if (!gst_byte_reader_skip (&reader, 5)) if (!gst_byte_reader_skip (&reader, 5))
break; break;
@ -481,7 +481,7 @@ mxf_mpeg_is_mpeg4_keyframe (GstBuffer * buffer)
while (gst_byte_reader_get_remaining (&reader) > 3) { while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) { if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) {
guint8 type; guint8 type = 0;
/* Found sync code */ /* Found sync code */
gst_byte_reader_skip (&reader, 3); gst_byte_reader_skip (&reader, 3);
@ -490,7 +490,7 @@ mxf_mpeg_is_mpeg4_keyframe (GstBuffer * buffer)
break; break;
if (type == 0xb6) { if (type == 0xb6) {
guint8 pic_type; guint8 pic_type = 0;
if (!gst_byte_reader_get_uint8 (&reader, &pic_type)) if (!gst_byte_reader_get_uint8 (&reader, &pic_type))
break; break;
@ -1021,7 +1021,7 @@ mxf_mpeg_is_mpeg2_frame (GstBuffer * buffer)
while (gst_byte_reader_get_remaining (&reader) > 3) { while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) { if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) {
guint8 type; guint8 type = 0;
/* Found sync code */ /* Found sync code */
gst_byte_reader_skip (&reader, 3); gst_byte_reader_skip (&reader, 3);
@ -1049,7 +1049,7 @@ mxf_mpeg_is_mpeg4_frame (GstBuffer * buffer)
while (gst_byte_reader_get_remaining (&reader) > 3) { while (gst_byte_reader_get_remaining (&reader) > 3) {
if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) { if (gst_byte_reader_peek_uint24_be (&reader, &tmp) && tmp == 0x000001) {
guint8 type; guint8 type = 0;
/* Found sync code */ /* Found sync code */
gst_byte_reader_skip (&reader, 3); gst_byte_reader_skip (&reader, 3);

View file

@ -312,7 +312,7 @@ done:
/* ERRORS */ /* ERRORS */
alloc_failed: alloc_failed:
{ {
GST_DEBUG_OBJECT (dec, "failed to pad_alloc buffer: %d (%d)", ret, GST_DEBUG_OBJECT (dec, "failed to pad_alloc buffer: %d (%s)", ret,
gst_flow_get_name (ret)); gst_flow_get_name (ret));
goto done; goto done;
} }

View file

@ -315,7 +315,7 @@ done:
/* ERRORS */ /* ERRORS */
alloc_failed: alloc_failed:
{ {
GST_DEBUG_OBJECT (enc, "failed to pad_alloc buffer: %d (%d)", ret, GST_DEBUG_OBJECT (enc, "failed to pad_alloc buffer: %d (%s)", ret,
gst_flow_get_name (ret)); gst_flow_get_name (ret));
goto done; goto done;
} }