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:
Stefano Sabatini 2011-08-06 12:42:02 +02:00
parent a8dcf5eebb
commit 3c56a421d8

View File

@ -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);