[FFmpeg-devel] [PATCH 4/6] lavc/videotoolboxdec: fix writing too many 1 bits for the reserved fields
rcombs
ffmpegagent at gmail.com
Mon May 9 21:16:22 EEST 2022
From: rcombs <rcombs at rcombs.me>
Signed-off-by: rcombs <rcombs at rcombs.me>
---
libavcodec/videotoolbox.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index c95c53fcf0..921fed9619 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -328,13 +328,13 @@ CFDataRef ff_videotoolbox_hvcc_extradata_create(AVCodecContext *avctx)
* bit(5) reserved = ‘11111’b;
* unsigned int(3) bitDepthLumaMinus8;
*/
- AV_W8(p + 17, (sps->bit_depth - 8) | 0xfc);
+ AV_W8(p + 17, (sps->bit_depth - 8) | 0xf8);
/*
* bit(5) reserved = ‘11111’b;
* unsigned int(3) bitDepthChromaMinus8;
*/
- AV_W8(p + 18, (sps->bit_depth_chroma - 8) | 0xfc);
+ AV_W8(p + 18, (sps->bit_depth_chroma - 8) | 0xf8);
/* bit(16) avgFrameRate; */
AV_WB16(p + 19, 0);
--
ffmpeg-codebot
More information about the ffmpeg-devel
mailing list