diff options
author | Jan Schmidt <jan@centricular.com> | 2020-10-30 03:36:51 +1100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2020-10-31 11:40:08 +0000 |
commit | a300aa43b1c662d504f22cfb42c6e07cf02273ef (patch) | |
tree | 6fb4959b44251997b0fa90b9ed884dc44c5a12da | |
parent | 709d27b510388e7203bdc626588e60d5a0472704 (diff) | |
download | gstreamer-plugins-good-a300aa43b1c662d504f22cfb42c6e07cf02273ef.tar.gz |
splitmuxsrc: Mark running=false on shutdown.
Make sure that any late gst_element_call_async() callbacks
know that the elements is shutting down and bail out instead
of operating on the element we're trying to stop.
Fixes a spurious test failure in elements_splitmuxsrc
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/799>
-rw-r--r-- | gst/multifile/gstsplitmuxsrc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gst/multifile/gstsplitmuxsrc.c b/gst/multifile/gstsplitmuxsrc.c index 25c5d775f..d8569eb4a 100644 --- a/gst/multifile/gstsplitmuxsrc.c +++ b/gst/multifile/gstsplitmuxsrc.c @@ -993,7 +993,7 @@ gst_splitmux_src_stop (GstSplitMuxSrc * splitmux) SPLITMUX_SRC_LOCK (splitmux); if (!splitmux->running) goto out; - + splitmux->running = FALSE; GST_DEBUG_OBJECT (splitmux, "Stopping"); SPLITMUX_SRC_UNLOCK (splitmux); @@ -1028,7 +1028,6 @@ gst_splitmux_src_stop (GstSplitMuxSrc * splitmux) splitmux->num_parts = 0; splitmux->num_prepared_parts = 0; splitmux->num_created_parts = 0; - splitmux->running = FALSE; splitmux->total_duration = GST_CLOCK_TIME_NONE; /* Reset playback segment */ gst_segment_init (&splitmux->play_segment, GST_FORMAT_TIME); |