summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2010-12-04 19:55:32 -0800
committerDavid Schleef <ds@schleef.org>2011-02-17 13:47:52 -0800
commit455aaa3fbd2ba0b994fc28c09af93c01399ce6ac (patch)
treea8650070a7dc2600cd276c3b9a78887134556b29
parent92d5ea292634d9133ff25e06d70ef282502c0d2f (diff)
mpegtsmux: fix release_pad
Remove bogus freeing of pad element_private data that we never set (collectpads uses it, which causes confusion here). Also, check that our collectpads instance exists before using it. Partial fix for #636011.
-rw-r--r--gst/mpegtsmux/mpegtsmux.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index 55f51f6ea..0ed2403dd 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -800,28 +800,15 @@ static void
mpegtsmux_release_pad (GstElement * element, GstPad * pad)
{
MpegTsMux *mux = GST_MPEG_TSMUX (element);
- MpegTsPadData *pad_data = NULL;
GST_DEBUG_OBJECT (mux, "Pad %" GST_PTR_FORMAT " being released", pad);
- /* Get the MpegTsPadData out of the pad */
- GST_OBJECT_LOCK (pad);
- pad_data = (MpegTsPadData *) gst_pad_get_element_private (pad);
- if (G_LIKELY (pad_data)) {
- /* Free codec data reference if any */
- if (pad_data->codec_data) {
- GST_DEBUG_OBJECT (element, "releasing codec_data reference");
- gst_buffer_unref (pad_data->codec_data);
- pad_data->codec_data = NULL;
- }
- if (pad_data->prepare_data && pad_data->free_func) {
- pad_data->free_func (pad_data->prepare_data);
- pad_data->prepare_data = pad_data->free_func = NULL;
- }
+ if (mux->collect) {
+ gst_collect_pads_remove_pad (mux->collect, pad);
}
- GST_OBJECT_UNLOCK (pad);
- gst_collect_pads_remove_pad (mux->collect, pad);
+ /* chain up */
+ gst_element_remove_pad (element, pad);
}
static gboolean