summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-03-18 13:35:37 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-03-29 10:28:25 +0300
commit3fba4e59fa5e646864ff32bfa765661d57b45871 (patch)
treec5e9296b7e6a64101c3d6793b3d955b19a9ab7f6 /gst
parent0ac3213dcb4db18b251b32584d1a1ddb2c8bd7c7 (diff)
downloadgstreamer-plugins-bad-3fba4e59fa5e646864ff32bfa765661d57b45871.tar.gz
mxfmux: Instead of releasing request pads on stop(), clear them only
Request pads are requested by applications and as such should only be released by them again. Instead of releasing them when stopping the muxer, just clear their state so that they can be used again when starting the muxer again. https://bugzilla.gnome.org/show_bug.cgi?id=763862
Diffstat (limited to 'gst')
-rw-r--r--gst/mxf/mxfmux.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/gst/mxf/mxfmux.c b/gst/mxf/mxfmux.c
index d363e7ab7..4fb66302f 100644
--- a/gst/mxf/mxfmux.c
+++ b/gst/mxf/mxfmux.c
@@ -222,19 +222,24 @@ gst_mxf_mux_reset (GstMXFMux * mux)
GList *l;
GST_OBJECT_LOCK (mux);
- while ((l = GST_ELEMENT_CAST (mux)->sinkpads) != NULL) {
- GstPad *pad = (GstPad *) l->data;
+ for (l = GST_ELEMENT_CAST (mux)->sinkpads; l; l = l->next) {
+ GstMXFMuxPad *pad = l->data;
- gst_object_ref (pad);
- GST_OBJECT_UNLOCK (mux);
- gst_element_release_request_pad (GST_ELEMENT_CAST (mux), pad);
- gst_object_unref (pad);
- GST_OBJECT_LOCK (mux);
+ gst_adapter_clear (pad->adapter);
+ g_free (pad->mapping_data);
+ pad->mapping_data = NULL;
+
+ pad->pos = 0;
+ pad->last_timestamp = 0;
+ pad->descriptor = NULL;
+ pad->have_complete_edit_unit = FALSE;
+
+ pad->source_package = NULL;
+ pad->source_track = NULL;
}
GST_OBJECT_UNLOCK (mux);
mux->state = GST_MXF_MUX_STATE_HEADER;
- mux->n_pads = 0;
if (mux->metadata) {
g_hash_table_destroy (mux->metadata);