[FFmpeg-cvslog] avformat/takdec: Don't initialize get_bits context to read one value
Andreas Rheinhardt
git at videolan.org
Fri Jan 7 13:02:03 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Mon Jan 3 13:06:40 2022 +0100| [72a822b975a2e98e856a7e7fd6b0deec326f4df4] | committer: Andreas Rheinhardt
avformat/takdec: Don't initialize get_bits context to read one value
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72a822b975a2e98e856a7e7fd6b0deec326f4df4
---
libavcodec/tak.h | 1 -
libavformat/takdec.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libavcodec/tak.h b/libavcodec/tak.h
index dc45a8c070..6069118971 100644
--- a/libavcodec/tak.h
+++ b/libavcodec/tak.h
@@ -44,7 +44,6 @@
#define TAK_LAST_FRAME_SIZE_BITS 24
#define TAK_ENCODER_CODEC_BITS 6
#define TAK_ENCODER_PROFILE_BITS 4
-#define TAK_ENCODER_VERSION_BITS 24
#define TAK_SAMPLE_RATE_MIN 6000
#define TAK_CHANNELS_MIN 1
#define TAK_BPS_MIN 8
diff --git a/libavformat/takdec.c b/libavformat/takdec.c
index bb256e1190..cc1f049512 100644
--- a/libavformat/takdec.c
+++ b/libavformat/takdec.c
@@ -171,9 +171,8 @@ static int tak_read_header(AVFormatContext *s)
get_bits(&gb, TAK_LAST_FRAME_SIZE_BITS);
av_freep(&buffer);
} else if (type == TAK_METADATA_ENCODER) {
- init_get_bits8(&gb, buffer, size - 3);
av_log(s, AV_LOG_VERBOSE, "encoder version: %0X\n",
- get_bits_long(&gb, TAK_ENCODER_VERSION_BITS));
+ AV_RL24(buffer));
av_freep(&buffer);
}
}
More information about the ffmpeg-cvslog
mailing list