mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
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
This commit is contained in:
parent
10a9b78d40
commit
cc1feff99f
1 changed files with 13 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue