asfmux: fix unused-but-set-variable warnings with gcc 4.6

This commit is contained in:
Tim-Philipp Müller 2011-04-14 18:36:16 +01:00
parent 276a1390c5
commit 6f045cb4d8
4 changed files with 13 additions and 48 deletions

View file

@ -499,7 +499,6 @@ gst_asf_mux_get_content_description_tags (GstAsfMux * asfmux,
GstAsfTags * asftags) GstAsfTags * asftags)
{ {
const GstTagList *tags; const GstTagList *tags;
GstTagList *taglist = NULL;
tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (asfmux)); tags = gst_tag_setter_get_tag_list (GST_TAG_SETTER (asfmux));
if (tags && !gst_tag_list_is_empty (tags)) { if (tags && !gst_tag_list_is_empty (tags)) {
@ -509,7 +508,6 @@ gst_asf_mux_get_content_description_tags (GstAsfMux * asfmux,
asftags->tags = gst_tag_list_new (); asftags->tags = gst_tag_list_new ();
asftags->cont_desc_size = 0; asftags->cont_desc_size = 0;
asftags->ext_cont_desc_size = 0; asftags->ext_cont_desc_size = 0;
taglist = asftags->tags;
GST_DEBUG_OBJECT (asfmux, "Processing tags"); GST_DEBUG_OBJECT (asfmux, "Processing tags");
gst_tag_list_foreach (tags, content_description_calc_size_for_tag, asftags); gst_tag_list_foreach (tags, content_description_calc_size_for_tag, asftags);

View file

@ -520,6 +520,11 @@ gboolean
gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet, gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet,
gboolean trust_delta_flag, guint packet_size) gboolean trust_delta_flag, guint packet_size)
{ {
/* Might be useful in future:
guint8 rep_data_len_type;
guint8 mo_number_len_type;
guint8 mo_offset_type;
*/
GstByteReader *reader; GstByteReader *reader;
gboolean ret = TRUE; gboolean ret = TRUE;
guint8 first = 0; guint8 first = 0;
@ -528,9 +533,6 @@ gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet,
guint8 packet_len_type; guint8 packet_len_type;
guint8 padding_len_type; guint8 padding_len_type;
guint8 seq_len_type; guint8 seq_len_type;
guint8 rep_data_len_type;
guint8 mo_number_len_type;
guint8 mo_offset_type;
gboolean mult_payloads; gboolean mult_payloads;
guint32 packet_len; guint32 packet_len;
guint32 padd_len; guint32 padd_len;
@ -587,9 +589,12 @@ gst_asf_parse_packet (GstBuffer * buffer, GstAsfPacketInfo * packet,
if (!gst_byte_reader_get_uint8 (reader, &aux)) if (!gst_byte_reader_get_uint8 (reader, &aux))
goto error; goto error;
/*
rep_data_len_type = aux & 0x3; rep_data_len_type = aux & 0x3;
mo_offset_type = (aux >> 2) & 0x3; mo_offset_type = (aux >> 2) & 0x3;
mo_number_len_type = (aux >> 4) & 0x3; mo_number_len_type = (aux >> 4) & 0x3;
*/
/* gets the fields lengths */ /* gets the fields lengths */
GST_LOG ("Getting packet and padding length"); GST_LOG ("Getting packet and padding length");

View file

@ -30,11 +30,6 @@
GST_DEBUG_CATEGORY_STATIC (asfparse_debug); GST_DEBUG_CATEGORY_STATIC (asfparse_debug);
#define GST_CAT_DEFAULT asfparse_debug #define GST_CAT_DEFAULT asfparse_debug
enum
{
PROP_0,
};
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
@ -47,10 +42,6 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS ("video/x-ms-asf, parsed = (boolean) false") GST_STATIC_CAPS ("video/x-ms-asf, parsed = (boolean) false")
); );
static void gst_asf_parse_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec);
static void gst_asf_parse_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec);
static GstStateChangeReturn gst_asf_parse_change_state (GstElement * element, static GstStateChangeReturn gst_asf_parse_change_state (GstElement * element,
GstStateChange transition); GstStateChange transition);
static void gst_asf_parse_loop (GstPad * pad); static void gst_asf_parse_loop (GstPad * pad);
@ -513,8 +504,6 @@ gst_asf_parse_class_init (GstAsfParseClass * klass)
parent_class = g_type_class_peek_parent (klass); parent_class = g_type_class_peek_parent (klass);
gobject_class->get_property = gst_asf_parse_get_property;
gobject_class->set_property = gst_asf_parse_set_property;
gobject_class->finalize = gst_asf_parse_finalize; gobject_class->finalize = gst_asf_parse_finalize;
gstelement_class->change_state = gstelement_class->change_state =
@ -543,34 +532,6 @@ gst_asf_parse_init (GstAsfParse * asfparse, GstAsfParseClass * klass)
gst_asf_parse_reset (asfparse); gst_asf_parse_reset (asfparse);
} }
static void
gst_asf_parse_get_property (GObject * object,
guint prop_id, GValue * value, GParamSpec * pspec)
{
GstAsfParse *asfparse;
asfparse = GST_ASF_PARSE (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gst_asf_parse_set_property (GObject * object,
guint prop_id, const GValue * value, GParamSpec * pspec)
{
GstAsfParse *asfparse;
asfparse = GST_ASF_PARSE (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static GstStateChangeReturn static GstStateChangeReturn
gst_asf_parse_change_state (GstElement * element, GstStateChange transition) gst_asf_parse_change_state (GstElement * element, GstStateChange transition)
{ {

View file

@ -312,7 +312,6 @@ gst_rtp_asf_pay_handle_packet (GstRtpAsfPay * rtpasfpay, GstBuffer * buffer)
static GstFlowReturn static GstFlowReturn
gst_rtp_asf_pay_parse_headers (GstRtpAsfPay * rtpasfpay) gst_rtp_asf_pay_parse_headers (GstRtpAsfPay * rtpasfpay)
{ {
GstFlowReturn ret = GST_FLOW_OK;
gchar *maxps; gchar *maxps;
g_return_val_if_fail (rtpasfpay->headers, GST_FLOW_ERROR); g_return_val_if_fail (rtpasfpay->headers, GST_FLOW_ERROR);
@ -346,9 +345,11 @@ gst_rtp_asf_pay_parse_headers (GstRtpAsfPay * rtpasfpay)
return GST_FLOW_OK; return GST_FLOW_OK;
error: error:
ret = GST_FLOW_ERROR; {
GST_ERROR_OBJECT (rtpasfpay, "Error while parsing headers"); GST_ELEMENT_ERROR (rtpasfpay, STREAM, DECODE, (NULL),
("Error parsing headers"));
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
}
} }
static GstFlowReturn static GstFlowReturn