mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-20 22:41:11 +00:00
lavfi: avoid void* arithmetic in defaults.c:set_common_formats()
void* pointer arithmetic semantics is undefined, use uint8_t* instead. Also fix GCC warnings: defaults.c: In function ‘set_common_formats’: defaults.c:184: warning: pointer of type ‘void *’ used in arithmetic defaults.c:189: warning: pointer of type ‘void *’ used in arithmetic
This commit is contained in:
parent
a8dcf5eebb
commit
3c56a421d8
@ -181,12 +181,12 @@ static void set_common_formats(AVFilterContext *ctx, AVFilterFormats *fmts,
|
||||
for (i = 0; i < ctx->input_count; i++)
|
||||
if (ctx->inputs[i] && ctx->inputs[i]->type == type)
|
||||
avfilter_formats_ref(fmts,
|
||||
(AVFilterFormats**)((void*)ctx->inputs[i]+offout));
|
||||
(AVFilterFormats **)((uint8_t *)ctx->inputs[i]+offout));
|
||||
|
||||
for (i = 0; i < ctx->output_count; i++)
|
||||
if (ctx->outputs[i] && ctx->outputs[i]->type == type)
|
||||
avfilter_formats_ref(fmts,
|
||||
(AVFilterFormats**)((void*)ctx->outputs[i]+offin));
|
||||
(AVFilterFormats **)((uint8_t *)ctx->outputs[i]+offin));
|
||||
|
||||
if (!fmts->refcount) {
|
||||
av_free(fmts->formats);
|
||||
|
Loading…
Reference in New Issue
Block a user