mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-16 03:50:05 +01:00
lavf: Allocate arrays with av_realloc if they will be realloced later
Pointers returned from av_malloc can't in general be passed to av_realloc. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -74,7 +74,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
|
||||
return AVERROR(ENAMETOOLONG);
|
||||
}
|
||||
|
||||
if (!(nodes = av_malloc(sizeof(*nodes) * len))) {
|
||||
if (!(nodes = av_realloc(NULL, sizeof(*nodes) * len))) {
|
||||
return AVERROR(ENOMEM);
|
||||
} else
|
||||
data->nodes = nodes;
|
||||
|
||||
Reference in New Issue
Block a user