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
| ... | ... |
@@ -181,12 +181,12 @@ static void set_common_formats(AVFilterContext *ctx, AVFilterFormats *fmts, |
| 181 | 181 |
for (i = 0; i < ctx->input_count; i++) |
| 182 | 182 |
if (ctx->inputs[i] && ctx->inputs[i]->type == type) |
| 183 | 183 |
avfilter_formats_ref(fmts, |
| 184 |
- (AVFilterFormats**)((void*)ctx->inputs[i]+offout)); |
|
| 184 |
+ (AVFilterFormats **)((uint8_t *)ctx->inputs[i]+offout)); |
|
| 185 | 185 |
|
| 186 | 186 |
for (i = 0; i < ctx->output_count; i++) |
| 187 | 187 |
if (ctx->outputs[i] && ctx->outputs[i]->type == type) |
| 188 | 188 |
avfilter_formats_ref(fmts, |
| 189 |
- (AVFilterFormats**)((void*)ctx->outputs[i]+offin)); |
|
| 189 |
+ (AVFilterFormats **)((uint8_t *)ctx->outputs[i]+offin)); |
|
| 190 | 190 |
|
| 191 | 191 |
if (!fmts->refcount) {
|
| 192 | 192 |
av_free(fmts->formats); |