mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avfilter/asrc_flite: Don't segfault when using list_voices option
Could also happen if initializing flite failed* or if an unknown voice has been selected or if registering the voice failed. *: which it currently can't, because it is a no-op. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
9a1547ba1e
commit
304cc03798
@ -196,10 +196,12 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
{
|
||||
FliteContext *flite = ctx->priv;
|
||||
|
||||
if (!--flite->voice_entry->usage_count)
|
||||
flite->voice_entry->unregister_fn(flite->voice);
|
||||
flite->voice = NULL;
|
||||
flite->voice_entry = NULL;
|
||||
if (flite->voice_entry) {
|
||||
if (!--flite->voice_entry->usage_count)
|
||||
flite->voice_entry->unregister_fn(flite->voice);
|
||||
flite->voice = NULL;
|
||||
flite->voice_entry = NULL;
|
||||
}
|
||||
delete_wave(flite->wave);
|
||||
flite->wave = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user