ff_merge_samplerates will be deallocate a or b in some case, so add a check before free the format.
Unified · Split
| @@ -419,8 +419,10 @@ static int can_merge_formats(AVFilterFormats *a_arg, · 418 unmodified lines | |||
| 419 | av_freep(&ret); | 419 | av_freep(&ret); |
| 420 | return 1; | 420 | return 1; |
| 421 | } else { | 421 | } else { |
| 422 | av_freep(&a->formats); | 422 | if (a) |
| 423 | av_freep(&b->formats); | 423 | av_freep(&a->formats); |
| 424 | if (b) | ||
| 425 | av_freep(&b->formats); | ||
| 424 | av_freep(&a); | 426 | av_freep(&a); |
| 425 | av_freep(&b); | 427 | av_freep(&b); |
| 426 | return 0; | 428 | return 0; |