mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
qtdemux: Do not run the preferred decryptor context query if no decryptor avalaible
Ultimately this avoids a segfault as the code expect a non NULL array here.
This commit is contained in:
parent
c2a0da8096
commit
3e063703b3
1 changed files with 7 additions and 0 deletions
|
@ -8056,6 +8056,13 @@ gst_qtdemux_request_protection_context (GstQTDemux * qtdemux,
|
||||||
g_ptr_array_add (qtdemux->protection_system_ids, NULL);
|
g_ptr_array_add (qtdemux->protection_system_ids, NULL);
|
||||||
filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors (
|
filtered_sys_ids = gst_protection_filter_systems_by_available_decryptors (
|
||||||
(const gchar **) qtdemux->protection_system_ids->pdata);
|
(const gchar **) qtdemux->protection_system_ids->pdata);
|
||||||
|
|
||||||
|
if (!filtered_sys_ids) {
|
||||||
|
GST_INFO_OBJECT (element,
|
||||||
|
"No avalaible decryptor, not worth asking the user to choose.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
g_ptr_array_remove_index (qtdemux->protection_system_ids,
|
g_ptr_array_remove_index (qtdemux->protection_system_ids,
|
||||||
qtdemux->protection_system_ids->len - 1);
|
qtdemux->protection_system_ids->len - 1);
|
||||||
GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
|
GST_TRACE_OBJECT (qtdemux, "detected %u protection systems, we have "
|
||||||
|
|
Loading…
Reference in a new issue