mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
lavfi/avfiltergraph: add check before free the format
ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
This commit is contained in:
parent
df6876d691
commit
f156f4ab23
@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg,
|
||||
av_freep(&ret);
|
||||
return 1;
|
||||
} else {
|
||||
av_freep(&a->formats);
|
||||
av_freep(&b->formats);
|
||||
if (a)
|
||||
av_freep(&a->formats);
|
||||
if (b)
|
||||
av_freep(&b->formats);
|
||||
av_freep(&a);
|
||||
av_freep(&b);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user