summaryrefslogtreecommitdiff
path: root/gst/mxf
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-25 12:54:00 +0200
commitcc1feff99f19c62cba46e32b1110b1414cadb6df (patch)
tree0faf63c4546addc0fe2e77bc2a8ad2493ad5626c /gst/mxf
parent10a9b78d402756c4b553d08e1b10e9a4a48c9db5 (diff)
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/mxf')
-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 c614f626c..c21a84d0c 100644
--- a/gst/mxf/mxfmux.c
+++ b/gst/mxf/mxfmux.c
@@ -221,19 +221,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);