mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
hlsdemux: Post error message if hlsdemux could not start decryption
_decrypt_start() failure will lead to decryption failure eventually but catching it earlier if possible. The decrpytion start failure means that the hls plugin was built without crypto library or crypto library does not want to accept given key and IV.
This commit is contained in:
parent
98b303498a
commit
15c10618a2
1 changed files with 10 additions and 3 deletions
|
@ -770,18 +770,25 @@ gst_hls_demux_start_fragment (GstAdaptiveDemux * demux,
|
||||||
if (key == NULL)
|
if (key == NULL)
|
||||||
goto key_failed;
|
goto key_failed;
|
||||||
|
|
||||||
gst_hls_demux_stream_decrypt_start (hls_stream, key->data,
|
if (!gst_hls_demux_stream_decrypt_start (hls_stream, key->data,
|
||||||
hls_stream->current_iv);
|
hls_stream->current_iv))
|
||||||
|
goto decrypt_start_failed;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
key_failed:
|
key_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (demux, STREAM, DEMUX,
|
GST_ELEMENT_ERROR (demux, STREAM, DECRYPT_NOKEY,
|
||||||
("Couldn't retrieve key for decryption"), (NULL));
|
("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;
|
||||||
}
|
}
|
||||||
|
decrypt_start_failed:
|
||||||
|
{
|
||||||
|
GST_ELEMENT_ERROR (demux, STREAM, DECRYPT, ("Failed to start decrypt"),
|
||||||
|
("Couldn't set key and IV or plugin was built without crypto library"));
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstHLSTSReaderType
|
static GstHLSTSReaderType
|
||||||
|
|
Loading…
Reference in a new issue