From 3851c2da1281b91f1bc6931232eb109c61a1808e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 17 Mar 2023 15:51:53 +0200 Subject: [PATCH] tsdemux: Fix reading of extended Opus channel configuration Argument evaluation order is implementation defined in C, and gcc is evaluating right-to-left (works) while clang is evaluating left-to-right (does not work). Part-of: --- subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c b/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c index 04209a0666..c0c1dcaf8b 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsdemux/tsdemux.c @@ -1601,11 +1601,12 @@ create_pad_for_stream (MpegTSBase * base, MpegTSBaseStream * bstream, guint8 stream_count_minus_one, coupled_stream_count; gint stream_count_minus_one_len, coupled_stream_count_len; gint channel_mapping_len, i; + guint remaining_bytes; + remaining_bytes = gst_byte_reader_get_remaining (&br); gst_bit_reader_init (&breader, gst_byte_reader_get_data_unchecked - (&br, gst_byte_reader_get_remaining - (&br)), gst_byte_reader_get_remaining (&br)); + (&br, remaining_bytes), remaining_bytes); stream_count_minus_one_len = ceil (_gst_log2 (channels)); if (!gst_bit_reader_get_bits_uint8 (&breader,