diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/audiofile/gstafsink.c | 3 | ||||
-rw-r--r-- | ext/audiofile/gstafsrc.c | 3 | ||||
-rw-r--r-- | ext/dash/gstmpdparser.c | 3 | ||||
-rw-r--r-- | ext/gl/gstglbumper.c | 3 | ||||
-rw-r--r-- | ext/gl/gstgldifferencematte.c | 3 | ||||
-rw-r--r-- | ext/gl/gstglfiltershader.c | 12 | ||||
-rw-r--r-- | ext/gl/gstgloverlay.c | 3 | ||||
-rw-r--r-- | ext/hls/gsthlsdemux.c | 6 | ||||
-rw-r--r-- | ext/kate/gstkateenc.c | 9 | ||||
-rw-r--r-- | ext/kate/gstkatespu.c | 3 | ||||
-rw-r--r-- | ext/kate/gstkateutil.c | 6 | ||||
-rw-r--r-- | ext/libmms/gstmms.c | 3 | ||||
-rw-r--r-- | ext/neon/gstneonhttpsrc.c | 3 | ||||
-rw-r--r-- | ext/opus/gstopusenc.c | 3 | ||||
-rw-r--r-- | ext/sndfile/gstsfsink.c | 3 | ||||
-rw-r--r-- | ext/sndfile/gstsfsrc.c | 3 | ||||
-rw-r--r-- | ext/spc/tag.c | 21 | ||||
-rw-r--r-- | ext/timidity/gsttimidity.c | 3 | ||||
-rw-r--r-- | ext/wayland/gstwaylandsink.c | 3 |
19 files changed, 32 insertions, 64 deletions
diff --git a/ext/audiofile/gstafsink.c b/ext/audiofile/gstafsink.c index 22c66cb3c..6fb39842e 100644 --- a/ext/audiofile/gstafsink.c +++ b/ext/audiofile/gstafsink.c @@ -217,8 +217,7 @@ gst_afsink_set_property (GObject * object, guint prop_id, const GValue * value, /* the element must be stopped or paused in order to do this */ g_return_if_fail ((GST_STATE (sink) < GST_STATE_PLAYING) || (GST_STATE (sink) == GST_STATE_PAUSED)); - if (sink->filename) - g_free (sink->filename); + g_free (sink->filename); sink->filename = g_strdup (g_value_get_string (value)); if ((GST_STATE (sink) == GST_STATE_PAUSED) && (sink->filename != NULL)) { diff --git a/ext/audiofile/gstafsrc.c b/ext/audiofile/gstafsrc.c index 45f86be83..ce4db3963 100644 --- a/ext/audiofile/gstafsrc.c +++ b/ext/audiofile/gstafsrc.c @@ -250,8 +250,7 @@ gst_afsrc_set_property (GObject * object, guint prop_id, const GValue * value, switch (prop_id) { case ARG_LOCATION: - if (src->filename) - g_free (src->filename); + g_free (src->filename); src->filename = g_strdup (g_value_get_string (value)); break; default: diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 7b0e43862..7642cebfb 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -3366,8 +3366,7 @@ combine_urls (GstUri * base, GList * list, gchar ** query, guint idx) gst_uri_unref (base); if (ret && query) { - if (*query) - g_free (*query); + g_free (*query); *query = gst_uri_get_query_string (ret); if (*query) { ret = gst_uri_make_writable (ret); diff --git a/ext/gl/gstglbumper.c b/ext/gl/gstglbumper.c index 188663b46..5820fac36 100644 --- a/ext/gl/gstglbumper.c +++ b/ext/gl/gstglbumper.c @@ -329,8 +329,7 @@ gst_gl_bumper_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: - if (bumper->location != NULL) - g_free (bumper->location); + g_free (bumper->location); bumper->location = g_value_dup_string (value); break; default: diff --git a/ext/gl/gstgldifferencematte.c b/ext/gl/gstgldifferencematte.c index a746b3dfd..8ffcf9b93 100644 --- a/ext/gl/gstgldifferencematte.c +++ b/ext/gl/gstgldifferencematte.c @@ -236,8 +236,7 @@ gst_gl_differencematte_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: - if (differencematte->location != NULL) - g_free (differencematte->location); + g_free (differencematte->location); differencematte->bg_has_changed = TRUE; differencematte->location = g_value_dup_string (value); break; diff --git a/ext/gl/gstglfiltershader.c b/ext/gl/gstglfiltershader.c index 8d3bb7fc6..510dcc44a 100644 --- a/ext/gl/gstglfiltershader.c +++ b/ext/gl/gstglfiltershader.c @@ -164,12 +164,10 @@ gst_gl_filtershader_finalize (GObject * object) { GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (object); - if (filtershader->vertex) - g_free (filtershader->vertex); + g_free (filtershader->vertex); filtershader->vertex = NULL; - if (filtershader->fragment) - g_free (filtershader->fragment); + g_free (filtershader->fragment); filtershader->fragment = NULL; if (filtershader->uniforms) @@ -195,16 +193,14 @@ gst_gl_filtershader_set_property (GObject * object, guint prop_id, break; case PROP_VERTEX: GST_OBJECT_LOCK (filtershader); - if (filtershader->vertex) - g_free (filtershader->vertex); + g_free (filtershader->vertex); filtershader->vertex = g_value_dup_string (value); filtershader->new_source = TRUE; GST_OBJECT_UNLOCK (filtershader); break; case PROP_FRAGMENT: GST_OBJECT_LOCK (filtershader); - if (filtershader->fragment) - g_free (filtershader->fragment); + g_free (filtershader->fragment); filtershader->fragment = g_value_dup_string (value); filtershader->new_source = TRUE; GST_OBJECT_UNLOCK (filtershader); diff --git a/ext/gl/gstgloverlay.c b/ext/gl/gstgloverlay.c index d4c1ee1a1..a152fc22c 100644 --- a/ext/gl/gstgloverlay.c +++ b/ext/gl/gstgloverlay.c @@ -277,8 +277,7 @@ gst_gl_overlay_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: - if (overlay->location != NULL) - g_free (overlay->location); + g_free (overlay->location); overlay->location_has_changed = TRUE; overlay->location = g_value_dup_string (value); break; diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index e3c0096eb..13947c04b 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -674,11 +674,9 @@ gst_hls_demux_update_fragment_info (GstAdaptiveDemuxStream * stream) stream->fragment.timestamp = GST_CLOCK_TIME_NONE; } - if (hlsdemux->current_key) - g_free (hlsdemux->current_key); + g_free (hlsdemux->current_key); hlsdemux->current_key = key; - if (hlsdemux->current_iv) - g_free (hlsdemux->current_iv); + g_free (hlsdemux->current_iv); hlsdemux->current_iv = iv; g_free (stream->fragment.uri); stream->fragment.uri = next_fragment_uri; diff --git a/ext/kate/gstkateenc.c b/ext/kate/gstkateenc.c index 595868f3e..a48ea1e2c 100644 --- a/ext/kate/gstkateenc.c +++ b/ext/kate/gstkateenc.c @@ -791,12 +791,9 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf) kbitmap = (kate_bitmap *) g_malloc (sizeof (kate_bitmap)); kpalette = (kate_palette *) g_malloc (sizeof (kate_palette)); if (!kregion || !kpalette || !kbitmap) { - if (kregion) - g_free (kregion); - if (kbitmap) - g_free (kbitmap); - if (kpalette) - g_free (kpalette); + g_free (kregion); + g_free (kbitmap); + g_free (kpalette); GST_ELEMENT_ERROR (ke, STREAM, ENCODE, (NULL), ("Out of memory")); return GST_FLOW_ERROR; } diff --git a/ext/kate/gstkatespu.c b/ext/kate/gstkatespu.c index bdf0dd829..b7838c13e 100644 --- a/ext/kate/gstkatespu.c +++ b/ext/kate/gstkatespu.c @@ -911,7 +911,6 @@ gst_kate_spu_encode_spu (GstKateDec * kd, const kate_event * ev) error: kate_tracker_clear (&kin); - if (bytes) - g_free (bytes); + g_free (bytes); return NULL; } diff --git a/ext/kate/gstkateutil.c b/ext/kate/gstkateutil.c index 93777ab58..cf1a2af47 100644 --- a/ext/kate/gstkateutil.c +++ b/ext/kate/gstkateutil.c @@ -371,11 +371,9 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder, } /* update properties */ - if (decoder->language) - g_free (decoder->language); + g_free (decoder->language); decoder->language = g_strdup (decoder->k.ki->language); - if (decoder->category) - g_free (decoder->category); + g_free (decoder->category); decoder->category = g_strdup (decoder->k.ki->category); decoder->original_canvas_width = decoder->k.ki->original_canvas_width; decoder->original_canvas_height = decoder->k.ki->original_canvas_height; diff --git a/ext/libmms/gstmms.c b/ext/libmms/gstmms.c index 25938c872..5e3ff386f 100644 --- a/ext/libmms/gstmms.c +++ b/ext/libmms/gstmms.c @@ -609,8 +609,7 @@ gst_mms_uri_set_uri (GstURIHandler * handler, const gchar * uri, } GST_OBJECT_LOCK (src); - if (src->uri_name) - g_free (src->uri_name); + g_free (src->uri_name); src->uri_name = fixed_uri; GST_OBJECT_UNLOCK (src); diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c index e20b509c5..8a4ff0d37 100644 --- a/ext/neon/gstneonhttpsrc.c +++ b/ext/neon/gstneonhttpsrc.c @@ -321,8 +321,7 @@ gst_neonhttp_src_set_property (GObject * object, guint prop_id, break; } case PROP_USER_AGENT: - if (src->user_agent) - g_free (src->user_agent); + g_free (src->user_agent); src->user_agent = g_strdup (g_value_get_string (value)); break; case PROP_COOKIES: diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index d4a685adc..9214837ca 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -1091,8 +1091,7 @@ done: if (bdata) gst_buffer_unmap (buf, &map); - if (mdata) - g_free (mdata); + g_free (mdata); return ret; } diff --git a/ext/sndfile/gstsfsink.c b/ext/sndfile/gstsfsink.c index c7f819499..5dc5e3af1 100644 --- a/ext/sndfile/gstsfsink.c +++ b/ext/sndfile/gstsfsink.c @@ -148,8 +148,7 @@ gst_sf_sink_set_location (GstSFSink * this, const gchar * location) if (this->file) goto was_open; - if (this->location) - g_free (this->location); + g_free (this->location); this->location = location ? g_strdup (location) : NULL; diff --git a/ext/sndfile/gstsfsrc.c b/ext/sndfile/gstsfsrc.c index d41953d2f..1090e68b9 100644 --- a/ext/sndfile/gstsfsrc.c +++ b/ext/sndfile/gstsfsrc.c @@ -146,8 +146,7 @@ gst_sf_src_set_location (GstSFSrc * this, const gchar * location) if (this->file) goto was_open; - if (this->location) - g_free (this->location); + g_free (this->location); this->location = location ? g_strdup (location) : NULL; diff --git a/ext/spc/tag.c b/ext/spc/tag.c index 61e59d50f..bc13ecb72 100644 --- a/ext/spc/tag.c +++ b/ext/spc/tag.c @@ -328,20 +328,13 @@ spc_tag_get_info (guchar * data, guint length, spc_tag_info * info) void spc_tag_free (spc_tag_info * info) { - if (info->title) - g_free (info->title); - if (info->game) - g_free (info->game); - if (info->artist) - g_free (info->artist); - if (info->album) - g_free (info->album); - if (info->publisher) - g_free (info->publisher); - if (info->comment) - g_free (info->comment); - if (info->dumper) - g_free (info->dumper); + g_free (info->title); + g_free (info->game); + g_free (info->artist); + g_free (info->album); + g_free (info->publisher); + g_free (info->comment); + g_free (info->dumper); if (info->dump_date) g_date_free (info->dump_date); } diff --git a/ext/timidity/gsttimidity.c b/ext/timidity/gsttimidity.c index 086779538..418a5fe4c 100644 --- a/ext/timidity/gsttimidity.c +++ b/ext/timidity/gsttimidity.c @@ -588,8 +588,7 @@ gst_timidity_loop (GstPad * sinkpad) goto paused; } - if (timidity->mididata) - g_free (timidity->mididata); + g_free (timidity->mididata); timidity->mididata = g_malloc (timidity->mididata_size); timidity->mididata_offset = 0; diff --git a/ext/wayland/gstwaylandsink.c b/ext/wayland/gstwaylandsink.c index 10d477e8b..2d2860cd2 100644 --- a/ext/wayland/gstwaylandsink.c +++ b/ext/wayland/gstwaylandsink.c @@ -219,8 +219,7 @@ gst_wayland_sink_finalize (GObject * object) if (sink->pool) gst_object_unref (sink->pool); - if (sink->display_name) - g_free (sink->display_name); + g_free (sink->display_name); g_mutex_clear (&sink->display_lock); g_mutex_clear (&sink->render_lock); |