[FFmpeg-devel] [PATCH] avcodec/cbs_av1: fix range of allowed values for obu_type
Mark Thompson
sw at jkqxz.net
Tue Apr 2 01:37:27 EEST 2019
On 24/03/2019 22:28, James Almer wrote:
> 0 is a reserved value.
>
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> libavcodec/cbs_av1_syntax_template.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
> index 76eb90b279..35b030208b 100644
> --- a/libavcodec/cbs_av1_syntax_template.c
> +++ b/libavcodec/cbs_av1_syntax_template.c
> @@ -26,7 +26,7 @@ static int FUNC(obu_header)(CodedBitstreamContext *ctx, RWContext *rw,
>
> fc(1, obu_forbidden_bit, 0, 0);
>
> - fc(4, obu_type, 0, AV1_OBU_PADDING);
> + fc(4, obu_type, AV1_OBU_SEQUENCE_HEADER, AV1_OBU_PADDING);
> flag(obu_extension_flag);
> flag(obu_has_size_field);
>
>
Seems fine, but I'm not sure whether it is useful to distinguish 0 from the other reserved values (9-14) as invalid at this stage? They will all pass through and return ENOSYS later when we come to read/write the content anyway.
(LGTM if you feel strongly.)
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list