pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / encumbered / gst-plugins-bad / patches / 0014-opus-reject-major-version-number-above-what-we-grok.patch
blob560abe7ae38c7d297b59057f1eecfbaeae9c3fad
1 From b73a14139f54621a06137db7e7373f43c65870fa Mon Sep 17 00:00:00 2001
2 From: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
3 Date: Thu, 24 May 2012 22:12:56 +0100
4 Subject: [PATCH 14/20] opus: reject major version number above what we grok
6 ---
7 ext/opus/gstopusheader.c | 5 ++++-
8 1 file changed, 4 insertions(+), 1 deletion(-)
10 diff --git a/ext/opus/gstopusheader.c b/ext/opus/gstopusheader.c
11 index dc9954f..597808d 100644
12 --- a/ext/opus/gstopusheader.c
13 +++ b/ext/opus/gstopusheader.c
14 @@ -219,12 +219,15 @@ gst_opus_header_is_id_header (GstBuffer * buf)
16 gsize size = GST_BUFFER_SIZE (buf);
17 const guint8 *data = GST_BUFFER_DATA (buf);
18 - guint8 channels, channel_mapping_family, n_streams, n_stereo_streams;
19 + guint8 version, channels, channel_mapping_family, n_streams, n_stereo_streams;
21 if (size < 19)
22 return FALSE;
23 if (!gst_opus_header_is_header (buf, "OpusHead", 8))
24 return FALSE;
25 + version = data[8];
26 + if (version >= 0x0f) /* major version >=0 is what we grok */
27 + return FALSE;
28 channels = data[9];
29 if (channels == 0)
30 return FALSE;
31 --
32 1.7.10.4