mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
qtdemux: don't push encrypted buffer without cenc metadata
When the cenc metadata is stored outside of the moof box and the stream is exposed it is possible that the cenc metadata hasn't been processed yet while the first buffer is being pushed. When this happens the buffer can't possibly be decrypted downstream so don't push it. https://bugzilla.gnome.org/show_bug.cgi?id=762516
This commit is contained in:
parent
459ef195bb
commit
fb5d50cd07
1 changed files with 6 additions and 0 deletions
|
@ -4971,6 +4971,12 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
|
||||||
gst_pad_push_event (stream->pad, event);
|
gst_pad_push_event (stream->pad, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qtdemux->cenc_aux_info_offset > 0 && info->crypto_info == NULL) {
|
||||||
|
GST_DEBUG_OBJECT (qtdemux, "cenc metadata hasn't been parsed yet");
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
index = stream->sample_index - (stream->n_samples - info->crypto_info->len);
|
index = stream->sample_index - (stream->n_samples - info->crypto_info->len);
|
||||||
if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
|
if (G_LIKELY (index >= 0 && index < info->crypto_info->len)) {
|
||||||
/* steal structure from array */
|
/* steal structure from array */
|
||||||
|
|
Loading…
Reference in a new issue