mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavfi: fix realloc size computation in avfilter_add_format()
Replace sizeof((*avff)->formats) with sizeof(*(*avff)->formats) as the size of the array element is given by the pointed element rather than by its pointer. In particular fix computation with the pending patch when sizeof(int64_t) != sizeof(int64_t *).
This commit is contained in:
parent
c6e288a7cd
commit
8f349b6481
@ -99,7 +99,7 @@ int avfilter_add_format(AVFilterFormats **avff, int fmt)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
fmts = av_realloc((*avff)->formats,
|
||||
sizeof((*avff)->formats) * ((*avff)->format_count+1));
|
||||
sizeof(*(*avff)->formats) * ((*avff)->format_count+1));
|
||||
if (!fmts)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user