avformat/takdec: Don't initialize get_bits context to read one value

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-01-03 13:06:40 +01:00
parent 035d2cc463
commit 72a822b975
2 changed files with 1 additions and 3 deletions

View File

@ -44,7 +44,6 @@
#define TAK_LAST_FRAME_SIZE_BITS 24 #define TAK_LAST_FRAME_SIZE_BITS 24
#define TAK_ENCODER_CODEC_BITS 6 #define TAK_ENCODER_CODEC_BITS 6
#define TAK_ENCODER_PROFILE_BITS 4 #define TAK_ENCODER_PROFILE_BITS 4
#define TAK_ENCODER_VERSION_BITS 24
#define TAK_SAMPLE_RATE_MIN 6000 #define TAK_SAMPLE_RATE_MIN 6000
#define TAK_CHANNELS_MIN 1 #define TAK_CHANNELS_MIN 1
#define TAK_BPS_MIN 8 #define TAK_BPS_MIN 8

View File

@ -171,9 +171,8 @@ static int tak_read_header(AVFormatContext *s)
get_bits(&gb, TAK_LAST_FRAME_SIZE_BITS); get_bits(&gb, TAK_LAST_FRAME_SIZE_BITS);
av_freep(&buffer); av_freep(&buffer);
} else if (type == TAK_METADATA_ENCODER) { } else if (type == TAK_METADATA_ENCODER) {
init_get_bits8(&gb, buffer, size - 3);
av_log(s, AV_LOG_VERBOSE, "encoder version: %0X\n", av_log(s, AV_LOG_VERBOSE, "encoder version: %0X\n",
get_bits_long(&gb, TAK_ENCODER_VERSION_BITS)); AV_RL24(buffer));
av_freep(&buffer); av_freep(&buffer);
} }
} }