mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 03:01:03 +00:00
qtdemux: Fix crash on MSE-style flush
The flowcombiner and active_streams shouldn't be cleared in the mse-bytestream variant, only in the mss-fragmented one. Otherwise the soft reset leaves qtdemux in a state where it still believes that it has streams, but they've been cleared. In that case, a null pointer dereference happens and the app crashes. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4199>
This commit is contained in:
parent
d3f92b9760
commit
735dac9d2f
1 changed files with 3 additions and 2 deletions
|
@ -2082,11 +2082,12 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
|
|||
g_free (qtdemux->preferred_protection_system_id);
|
||||
qtdemux->preferred_protection_system_id = NULL;
|
||||
}
|
||||
} else if (qtdemux->variant == VARIANT_MSS_FRAGMENTED
|
||||
|| qtdemux->variant == VARIANT_MSE_BYTESTREAM) {
|
||||
} else if (qtdemux->variant == VARIANT_MSS_FRAGMENTED) {
|
||||
gst_flow_combiner_reset (qtdemux->flowcombiner);
|
||||
g_ptr_array_foreach (qtdemux->active_streams,
|
||||
(GFunc) gst_qtdemux_stream_clear, NULL);
|
||||
} else if (qtdemux->variant == VARIANT_MSE_BYTESTREAM) {
|
||||
/* Do nothing */
|
||||
} else {
|
||||
gst_flow_combiner_reset (qtdemux->flowcombiner);
|
||||
for (i = 0; i < QTDEMUX_N_STREAMS (qtdemux); i++) {
|
||||
|
|
Loading…
Reference in a new issue