Ensuring that GstEnginePipeline decodebin is not dereferenced before its state is set to NULL.

Fixes #7115 which resulted from previous commit.
This commit is contained in:
Lukas Prediger 2021-11-10 20:49:19 +02:00
parent d033b38c4b
commit 3def4a80f7
No known key found for this signature in database
GPG Key ID: DF7C5DA2E98A3428
2 changed files with 2 additions and 0 deletions

View File

@ -28,4 +28,5 @@ void GstElementDeleter::DeleteElementLater(GstElement* element) {
void GstElementDeleter::DeleteElement(GstElement* element) {
gst_element_set_state(element, GST_STATE_NULL);
gst_object_unref(element);
}

View File

@ -1146,6 +1146,7 @@ void GstEnginePipeline::SourceSetupCallback(GstURIDecodeBin* bin,
void GstEnginePipeline::TransitionToNext() {
GstElement* old_decode_bin = uridecodebin_;
gst_object_ref(old_decode_bin);
ignore_tags_ = true;