Fix potential use of streamer element after deletion.
If ReplaceDecodeBin fails from TransitionToNext, uridecodebin_ will not be replaced with a new element. Since TransitionToNext does not check the return value, it unknowingly deletes uridecodebin_.
This commit is contained in:
parent
50e1158106
commit
102c529f80
|
@ -1004,7 +1004,10 @@ void GstEnginePipeline::TransitionToNext() {
|
||||||
|
|
||||||
ignore_tags_ = true;
|
ignore_tags_ = true;
|
||||||
|
|
||||||
ReplaceDecodeBin(next_url_);
|
if (!ReplaceDecodeBin(next_url_)) {
|
||||||
|
qLog(Error) << "ReplaceDecodeBin failed with " << next_url_;
|
||||||
|
return;
|
||||||
|
}
|
||||||
gst_element_set_state(uridecodebin_, GST_STATE_PLAYING);
|
gst_element_set_state(uridecodebin_, GST_STATE_PLAYING);
|
||||||
MaybeLinkDecodeToAudio();
|
MaybeLinkDecodeToAudio();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue