mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
hlsdemux2: Avoid NULL pointer usage
The pending/current variant are both NULL when the demuxer is resetted. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6410>
This commit is contained in:
parent
9ce063f5f6
commit
77fa0ae0e7
1 changed files with 4 additions and 0 deletions
|
@ -1296,6 +1296,10 @@ gst_hls_demux_check_variant_playlist_loaded (GstHLSDemux * demux)
|
|||
demux->pending_variant ? demux->pending_variant : demux->current_variant;
|
||||
GstHLSDemuxStream *stream = demux->main_stream;
|
||||
|
||||
/* The demuxer has been resetted in the meantime */
|
||||
if (target_variant == NULL)
|
||||
return GST_FLOW_FLUSHING;
|
||||
|
||||
return gst_hls_demux_stream_check_current_playlist_uri (stream,
|
||||
target_variant->uri);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue