summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ashley <bugzilla@ashley-family.net>2016-02-09 17:17:09 +0000
committerThiago Santos <thiagoss@osg.samsung.com>2016-04-21 16:57:58 -0300
commit5ba07e86e312e63f0fd592d9538dc74d56f82bfd (patch)
treeca78fea2d17375fbe86d0c2cee03a52d427ec770
parent4f5a6d35176f4fa915d74a418bef52fe49ce8598 (diff)
qtdemux: support seeking of CENC encrypted streams1.6
When playing a stream that has been protected by DASH CENC, playback will fail if a seek is performed. Qtdemux produces the error "stream is protected using cenc, but no cenc protection system information has been found" and playback stops. The problem is that gst_qtdemux_reset() gets called as part of the FLUSH during a seek. This function frees the protection_system_ids array. When gst_qtdemux_configure_protected_caps() is called after the seek has completed, the protection_system_ids array is empty and qtdemux is unable to create the correct output caps for the protected stream. This commit changes it to only free the protection_system_ids on hard resets. https://bugzilla.gnome.org/show_bug.cgi?id=761787
-rw-r--r--gst/isomp4/qtdemux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index b1f4f1585..4111d74e0 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -1935,10 +1935,6 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
qtdemux->have_group_id = FALSE;
qtdemux->group_id = G_MAXUINT;
- if (qtdemux->protection_system_ids) {
- g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
- qtdemux->protection_system_ids = NULL;
- }
g_queue_foreach (&qtdemux->protection_event_queue, (GFunc) gst_event_unref,
NULL);
g_queue_clear (&qtdemux->protection_event_queue);
@@ -1962,6 +1958,10 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
gst_caps_replace (&qtdemux->media_caps, NULL);
qtdemux->timescale = 0;
qtdemux->got_moov = FALSE;
+ if (qtdemux->protection_system_ids) {
+ g_ptr_array_free (qtdemux->protection_system_ids, TRUE);
+ qtdemux->protection_system_ids = NULL;
+ }
} else if (qtdemux->mss_mode) {
gst_flow_combiner_reset (qtdemux->flowcombiner);
for (n = 0; n < qtdemux->n_streams; n++)