From 5d0d42fb9546b317f6e2184d85eca6d2460e287e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 17 Mar 2023 17:13:39 +0200 Subject: [PATCH] matroskademux: Make gst_byte_reader_get_data() usage less confusing This is effectively the same behaviour but retrieving 0 bytes of data is confusing to read. Part-of: --- .../gst-plugins-good/gst/matroska/matroska-read-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c b/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c index 6fadbba956..0e9d0b6b14 100644 --- a/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c +++ b/subprojects/gst-plugins-good/gst/matroska/matroska-read-common.c @@ -592,8 +592,9 @@ gst_matroska_parse_protection_meta (gpointer * data_out, gsize * size_out, gst_structure_set (info_protect, "subsample_count", G_TYPE_UINT, 0, NULL); } - gst_byte_reader_get_data (&reader, 0, (const guint8 **) data_out); *size_out = gst_byte_reader_get_remaining (&reader); + gst_byte_reader_get_data (&reader, *size_out, (const guint8 **) data_out); + return TRUE; release_err: