mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-25 16:48:11 +00:00
hlsdemux: fix crash when decryption key can't be downloaded
Happened with http://sslhls.m6tv.cdn.sfr.net/hls-live/livepkgr/_definst_/m6_hls_aes/m6_hls_aes_856.m3u8 if glib-networking was not installed (since key has https uri).
This commit is contained in:
parent
97ea56e91c
commit
64adb1998d
2 changed files with 12 additions and 4 deletions
|
@ -477,10 +477,13 @@ gst_hls_demux_start_fragment (GstAdaptiveDemux * demux,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
key_failed:
|
key_failed:
|
||||||
/* TODO Raise this error to the user */
|
{
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, DEMUX,
|
||||||
|
("Couldn't retrieve key for decryption"), (NULL));
|
||||||
GST_WARNING_OBJECT (demux, "Failed to decrypt data");
|
GST_WARNING_OBJECT (demux, "Failed to decrypt data");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
|
gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
|
||||||
|
|
|
@ -1815,7 +1815,10 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
|
|
||||||
stream->starting_fragment = FALSE;
|
stream->starting_fragment = FALSE;
|
||||||
if (klass->start_fragment) {
|
if (klass->start_fragment) {
|
||||||
klass->start_fragment (demux, stream);
|
if (!klass->start_fragment (demux, stream)) {
|
||||||
|
ret = GST_FLOW_ERROR;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_BUFFER_PTS (buffer) = stream->fragment.timestamp;
|
GST_BUFFER_PTS (buffer) = stream->fragment.timestamp;
|
||||||
|
@ -1881,6 +1884,8 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
||||||
ret = GST_FLOW_EOS; /* return EOS to make the source stop */
|
ret = GST_FLOW_EOS; /* return EOS to make the source stop */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error:
|
||||||
|
|
||||||
GST_MANIFEST_UNLOCK (demux);
|
GST_MANIFEST_UNLOCK (demux);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue