Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: prevent initdatabuffer being overwritten when multiple keysytems are present #12

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,10 @@ static gboolean webkitMediaPlayReadyDecryptSinkEventHandler(GstBaseTransform* tr
case GST_EVENT_PROTECTION: {
const gchar* systemId;
const gchar* origin;
GstBuffer* initdatabuffer;

GST_INFO_OBJECT(self, "received protection event");
gst_event_parse_protection(event, &systemId, &self->initDataBuffer, &origin);
gst_event_parse_protection(event, &systemId, &initdatabuffer, &origin);
GST_DEBUG_OBJECT(self, "systemId: %s", systemId);
if (!g_str_equal(systemId, PLAYREADY_PROTECTION_SYSTEM_ID)
|| !g_str_has_prefix(origin, "smooth-streaming")) {
Expand All @@ -368,6 +369,7 @@ static gboolean webkitMediaPlayReadyDecryptSinkEventHandler(GstBaseTransform* tr
// Keep the event ref around so that the parsed event data
// remains valid until the drm-key-need message has been sent.
self->protectionEvent = event;
self->initDataBuffer = initdatabuffer;
g_timeout_add(0, requestKey, self);

result = TRUE;
Expand Down