Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-14 00:02:57 +0300
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-17 17:47:29 +0300
commit2d764069be3b4092dc986467660607d922023332 (patch)
tree1504ef9e286b8df559635e97d31ebe767a9e6426 /libavcodec/svq1dec.c
parent97141ffeec803c448d81ee4a53cfa2355f79f7ec (diff)
avcodec/vlc: Use structure instead of VLC_TYPE array as VLC element
In C, qualifiers for arrays are broken: const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE elements and unfortunately this is not compatible with a pointer to a const array of two VLC_TYPE, because the latter does not exist as array types are never qualified (the qualifier applies to the base type instead). This is the reason why get_vlc2() doesn't accept a const VLC table despite not modifying the table at all, as there is no automatic conversion from VLC_TYPE (*)[2] to const VLC_TYPE (*)[2]. Fix this by using a structure VLCElem for the VLC table. This also has the advantage of making it clear which element is which. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/svq1dec.c')
-rw-r--r--libavcodec/svq1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 7cd623ff18..6fb50575bf 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -777,7 +777,7 @@ static av_cold void svq1_static_init(void)
for (int i = 0, offset = 0; i < 6; i++) {
static const uint8_t sizes[2][6] = { { 14, 10, 14, 18, 16, 18 },
{ 10, 10, 14, 14, 14, 16 } };
- static VLC_TYPE table[168][2];
+ static VLCElem table[168];
svq1_intra_multistage[i].table = &table[offset];
svq1_intra_multistage[i].table_allocated = sizes[0][i];
offset += sizes[0][i];