mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
Merge commit '096abfa15052977eed93f0b5e01afd2d47c53c1f'
* commit '096abfa15052977eed93f0b5e01afd2d47c53c1f': parser: fix large overreads bitstream: add get_bits64() to support reading more than 32 bits at once arm: detect cpu features at runtime on Linux Conflicts: libavcodec/parser.c libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -322,15 +322,15 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n)
|
||||
*/
|
||||
static inline uint64_t get_bits64(GetBitContext *s, int n)
|
||||
{
|
||||
if (n <= 32)
|
||||
if (n <= 32) {
|
||||
return get_bits_long(s, n);
|
||||
else {
|
||||
} else {
|
||||
#ifdef BITSTREAM_READER_LE
|
||||
uint64_t ret = get_bits_long(s, 32);
|
||||
return ret | (((uint64_t)get_bits_long(s, n-32)) << 32);
|
||||
return ret | (uint64_t)get_bits_long(s, n - 32) << 32;
|
||||
#else
|
||||
uint64_t ret = ((uint64_t)get_bits_long(s, 32)) << (n-32);
|
||||
return ret | get_bits_long(s, n-32);
|
||||
uint64_t ret = (uint64_t)get_bits_long(s, n - 32) << 32;
|
||||
return ret | get_bits_long(s, 32);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user