diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index 98f1d3714f..f2c6e5b35b 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -520,7 +520,6 @@ gst_mad_src_event (GstPad *pad, GstEvent *event) /* seek worked, we're done, loop will exit */ res = TRUE; } - gst_event_free (seek_event); } /* at this point, either the seek worked or res == FALSE */ if (res) @@ -534,6 +533,7 @@ gst_mad_src_event (GstPad *pad, GstEvent *event) break; } + gst_event_unref (event); return res; } @@ -692,7 +692,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer) mad->base_time = time; - gst_event_free (event); + gst_event_unref (event); discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time, NULL); gst_pad_push (mad->srcpad, GST_BUFFER (discont)); break; diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c index 08e81d8817..3228acf880 100644 --- a/ext/mpeg2dec/gstmpeg2dec.c +++ b/ext/mpeg2dec/gstmpeg2dec.c @@ -754,7 +754,6 @@ gst_mpeg2dec_src_event (GstPad *pad, GstEvent *event) /* seek worked, we're done, loop will exit */ res = TRUE; } - gst_event_free (seek_event); } /* at this point, either the seek worked or res == FALSE */ } @@ -764,6 +763,7 @@ gst_mpeg2dec_src_event (GstPad *pad, GstEvent *event) res = FALSE; break; } + gst_event_free (event); return res; } @@ -805,6 +805,7 @@ gst_mpeg2dec_change_state (GstElement *element) case GST_STATE_PLAYING_TO_PAUSED: /* need to clear things we get from other plugins, since we could be reconnected */ if (mpeg2dec->peerpool) { + gst_buffer_pool_unref (mpeg2dec->peerpool); mpeg2dec->peerpool = NULL; } break; diff --git a/ext/mpeg2dec/gstmpeg2deccvs.c b/ext/mpeg2dec/gstmpeg2deccvs.c index 82be51bd12..2d360739ab 100644 --- a/ext/mpeg2dec/gstmpeg2deccvs.c +++ b/ext/mpeg2dec/gstmpeg2deccvs.c @@ -633,7 +633,6 @@ gst_mpeg2dec_src_event (GstPad *pad, GstEvent *event) /* seek worked, we're done, loop will exit */ res = TRUE; } - gst_event_free (seek_event); } /* at this point, either the seek worked or res == FALSE */ } @@ -643,6 +642,7 @@ gst_mpeg2dec_src_event (GstPad *pad, GstEvent *event) res = FALSE; break; } + gst_event_unref (event); return res; } @@ -680,6 +680,7 @@ gst_mpeg2dec_change_state (GstElement *element) case GST_STATE_PLAYING_TO_PAUSED: /* need to clear things we get from other plugins, since we could be reconnected */ if (mpeg2dec->peerpool) { + gst_buffer_pool_unref (mpeg2dec->peerpool); mpeg2dec->peerpool = NULL; } break;