mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 00:24:12 +08:00
media: allegro: add helper to report unsupported fields
Allow generators to explicitly signal an error if the C structs contain unsupported or invalid fields. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
256442881b
commit
98c588b6d2
@ -29,6 +29,11 @@ void rbsp_init(struct rbsp *rbsp, void *addr, size_t size,
|
||||
rbsp->error = 0;
|
||||
}
|
||||
|
||||
void rbsp_unsupported(struct rbsp *rbsp)
|
||||
{
|
||||
rbsp->error = -EINVAL;
|
||||
}
|
||||
|
||||
static int rbsp_read_bits(struct rbsp *rbsp, int n, unsigned int *value);
|
||||
static int rbsp_write_bits(struct rbsp *rbsp, int n, unsigned int value);
|
||||
|
||||
|
@ -49,6 +49,7 @@ extern struct nal_rbsp_ops read;
|
||||
|
||||
void rbsp_init(struct rbsp *rbsp, void *addr, size_t size,
|
||||
struct nal_rbsp_ops *ops);
|
||||
void rbsp_unsupported(struct rbsp *rbsp);
|
||||
|
||||
void rbsp_bit(struct rbsp *rbsp, int *value);
|
||||
void rbsp_bits(struct rbsp *rbsp, int n, int *value);
|
||||
|
Loading…
Reference in New Issue
Block a user