aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-22 07:05:17 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-23 01:21:29 +0100
commit5996184bea3e7e7b00ddc6256788cd3e59d75913 (patch)
treef9c1622615e21933ea980276f0f6984657f18c09
parent16af5236aea621ee88641903ce080f2977691013 (diff)
downloadffmpeg-5996184bea3e7e7b00ddc6256788cd3e59d75913.tar.gz
avcodec/put_bits: Restore x64 ABI compatibility with releases <= 4.3
88d80cb97528d52dac3178cf5393d6095eca6200 changed the type of PutBitContext.BitBuf to uint64_t; it used to be an uint32_t. While said structure is not public, it is nevertheless used by certain avpriv functions and therefore crosses library boundaries: avpriv_align_put_bits and avpriv_copy_bits were used in other libraries in release 4.3 (and at the time of 88d80cb9) and so this commit broke ABI. This commit mitigates the trouble caused by this by using an uint32_t again, but only for the 4.4 release branch and not the master branch, as doing so for master, would break the ABI of master again, although it is very unlikely that anyone would be helped by this (there don't seem to be any users that combine libavcodec built from master and libavformat from an old release: otherwise we would have received bug reports about said ABI break). Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
-rw-r--r--libavcodec/put_bits.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index cd66a82a44..f07944a8fb 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -35,16 +35,9 @@
#include "version.h"
-#if ARCH_X86_64
-// TODO: Benchmark and optionally enable on other 64-bit architectures.
-typedef uint64_t BitBuf;
-#define AV_WBBUF AV_WB64
-#define AV_WLBUF AV_WL64
-#else
typedef uint32_t BitBuf;
#define AV_WBBUF AV_WB32
#define AV_WLBUF AV_WL32
-#endif
static const int BUF_BITS = 8 * sizeof(BitBuf);