matroska: demux: Strip signal byte from encrypted blocks
authorDavid Craven <david@craven.ch>
Sun, 9 Jul 2023 15:44:03 +0000 (17:44 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 11 Jul 2023 13:53:02 +0000 (13:53 +0000)
Removes the signal byte when the frame is unencrypted to
be consistent with when the frame is encrypted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5014>

subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c

index 0e9d0b6..0149b17 100644 (file)
@@ -448,6 +448,8 @@ gst_matroska_parse_protection_meta (gpointer * data_out, gsize * size_out,
 
   /* Unencrypted buffer */
   if (!(signal_byte & GST_MATROSKA_BLOCK_ENCRYPTED)) {
+    *size_out = gst_byte_reader_get_remaining (&reader);
+    gst_byte_reader_get_data (&reader, *size_out, (const guint8 **) data_out);
     return TRUE;
   }