From 0d32a3703d8e78adc7b0a475d7a34d3ec0d6a6b9 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sun, 19 Apr 2009 13:57:10 +0200 Subject: [PATCH] realmedia: Remove useless variables, only being used once (or not). --- gst/realmedia/gstrdtbuffer.c | 25 +++---------------------- gst/realmedia/rademux.c | 3 --- gst/realmedia/rdtmanager.c | 3 --- gst/realmedia/rmdemux.c | 2 -- 4 files changed, 3 insertions(+), 30 deletions(-) diff --git a/gst/realmedia/gstrdtbuffer.c b/gst/realmedia/gstrdtbuffer.c index 7f09f2331c..b383ef221e 100644 --- a/gst/realmedia/gstrdtbuffer.c +++ b/gst/realmedia/gstrdtbuffer.c @@ -278,22 +278,17 @@ gst_rdt_packet_data_get_seq (GstRDTPacket * packet) { guint header; guint8 *bufdata; - guint bufsize; - guint16 result; g_return_val_if_fail (packet != NULL, FALSE); g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), FALSE); bufdata = GST_BUFFER_DATA (packet->buffer); - bufsize = GST_BUFFER_SIZE (packet->buffer); /* skip header bits */ header = packet->offset + 1; /* read seq_no */ - result = GST_READ_UINT16_BE (&bufdata[header]); - - return result; + return GST_READ_UINT16_BE (&bufdata[header]); } gboolean @@ -302,7 +297,6 @@ gst_rdt_packet_data_peek_data (GstRDTPacket * packet, guint8 ** data, { guint header; guint8 *bufdata; - guint bufsize; gboolean length_included_flag; gboolean need_reliable_flag; guint8 stream_id; @@ -312,7 +306,6 @@ gst_rdt_packet_data_peek_data (GstRDTPacket * packet, guint8 ** data, g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), FALSE); bufdata = GST_BUFFER_DATA (packet->buffer); - bufsize = GST_BUFFER_SIZE (packet->buffer); header = packet->offset; @@ -360,13 +353,11 @@ gst_rdt_packet_data_get_stream_id (GstRDTPacket * packet) guint header; gboolean length_included_flag; guint8 *bufdata; - guint bufsize; g_return_val_if_fail (packet != NULL, 0); g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), 0); bufdata = GST_BUFFER_DATA (packet->buffer); - bufsize = GST_BUFFER_SIZE (packet->buffer); header = packet->offset; @@ -392,17 +383,14 @@ gst_rdt_packet_data_get_stream_id (GstRDTPacket * packet) guint32 gst_rdt_packet_data_get_timestamp (GstRDTPacket * packet) { - guint32 result; guint header; gboolean length_included_flag; guint8 *bufdata; - guint bufsize; g_return_val_if_fail (packet != NULL, 0); g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), 0); bufdata = GST_BUFFER_DATA (packet->buffer); - bufsize = GST_BUFFER_SIZE (packet->buffer); header = packet->offset; @@ -419,25 +407,20 @@ gst_rdt_packet_data_get_timestamp (GstRDTPacket * packet) header += 1; /* get timestamp */ - result = GST_READ_UINT32_BE (&bufdata[header]); - - return result; + return GST_READ_UINT32_BE (&bufdata[header]); } guint8 gst_rdt_packet_data_get_flags (GstRDTPacket * packet) { - guint8 result; guint header; gboolean length_included_flag; guint8 *bufdata; - guint bufsize; g_return_val_if_fail (packet != NULL, 0); g_return_val_if_fail (GST_RDT_IS_DATA_TYPE (packet->type), 0); bufdata = GST_BUFFER_DATA (packet->buffer); - bufsize = GST_BUFFER_SIZE (packet->buffer); header = packet->offset; @@ -451,7 +434,5 @@ gst_rdt_packet_data_get_flags (GstRDTPacket * packet) header += 2; } /* get flags */ - result = bufdata[header]; - - return result; + return bufdata[header]; } diff --git a/gst/realmedia/rademux.c b/gst/realmedia/rademux.c index 05f713da1d..a067c533d1 100644 --- a/gst/realmedia/rademux.c +++ b/gst/realmedia/rademux.c @@ -599,13 +599,10 @@ gst_real_audio_demux_chain (GstPad * pad, GstBuffer * buf) static void gst_real_audio_demux_loop (GstRealAudioDemux * demux) { - GstRealAudioDemuxState old_state; GstFlowReturn ret; GstBuffer *buf; guint bytes_needed; - old_state = demux->state; - /* check how much data we need */ switch (demux->state) { case REAL_AUDIO_DEMUX_STATE_MARKER: diff --git a/gst/realmedia/rdtmanager.c b/gst/realmedia/rdtmanager.c index 6dd0b41a50..b4bf3af97c 100644 --- a/gst/realmedia/rdtmanager.c +++ b/gst/realmedia/rdtmanager.c @@ -1096,9 +1096,6 @@ static GstStateChangeReturn gst_rdt_manager_change_state (GstElement * element, GstStateChange transition) { GstStateChangeReturn ret; - GstRDTManager *rdtmanager; - - rdtmanager = GST_RDT_MANAGER (element); switch (transition) { default: diff --git a/gst/realmedia/rmdemux.c b/gst/realmedia/rmdemux.c index fe174350df..a7854c49f0 100644 --- a/gst/realmedia/rmdemux.c +++ b/gst/realmedia/rmdemux.c @@ -1985,7 +1985,6 @@ gst_rmdemux_descramble_mp4a_audio (GstRMDemux * rmdemux, GstBuffer *buf, *outbuf; guint frames, index, i; guint8 *data; - guint size; GstClockTime timestamp; res = GST_FLOW_OK; @@ -1995,7 +1994,6 @@ gst_rmdemux_descramble_mp4a_audio (GstRMDemux * rmdemux, g_ptr_array_set_size (stream->subpackets, 0); data = GST_BUFFER_DATA (buf); - size = GST_BUFFER_SIZE (buf); timestamp = GST_BUFFER_TIMESTAMP (buf); frames = (data[1] & 0xf0) >> 4;