[FFmpeg-devel] [PATCH 1/4] avcodec/cbs_h265: fix writing extension_data bits
James Almer
jamrial at gmail.com
Tue Apr 21 00:45:48 EEST 2020
We only care about the right most bit.
Signed-off-by: James Almer <jamrial at gmail.com>
---
Fixes handling files like
https://trac.ffmpeg.org/attachment/ticket/7965/puppets_with_alpha_hevc.mov
Without this patch, parsing works but passing the VPS through hevc_metadata_bsf
when writing fails.
libavcodec/cbs_h265_syntax_template.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/cbs_h265_syntax_template.c b/libavcodec/cbs_h265_syntax_template.c
index 180a045c34..85b952e64c 100644
--- a/libavcodec/cbs_h265_syntax_template.c
+++ b/libavcodec/cbs_h265_syntax_template.c
@@ -80,7 +80,7 @@ static int FUNC(extension_data)(CodedBitstreamContext *ctx, RWContext *rw,
}
#else
for (k = 0; k < current->bit_length; k++)
- xu(1, extension_data, current->data[k / 8] >> (7 - k % 8), 0, 1, 0);
+ xu(1, extension_data, current->data[k / 8] >> (7 - k % 8) & 1, 0, 1, 0);
#endif
return 0;
}
--
2.26.0
More information about the ffmpeg-devel
mailing list