mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avfiltergraph: Properly handle memory allocation failure
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
6ef30976e0
commit
52aed19307
@ -392,6 +392,19 @@ static int can_merge_formats(AVFilterFormats *a_arg,
|
||||
return 1;
|
||||
a = clone_filter_formats(a_arg);
|
||||
b = clone_filter_formats(b_arg);
|
||||
|
||||
if (!a || !b) {
|
||||
if (a)
|
||||
av_freep(&a->formats);
|
||||
if (b)
|
||||
av_freep(&b->formats);
|
||||
|
||||
av_freep(&a);
|
||||
av_freep(&b);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (is_sample_rate) {
|
||||
ret = ff_merge_samplerates(a, b);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user