While audiod.c and filter.c test whether ->close is NULL
before they attempt to call the function, play.c calls ->close()
unconditionally. This does not matter because all filters provide the
close method. But it is documented in filter.h that ->close may be
NULL. To avoid future surprises and to be consistent with para_audiod
and para_filter, let's change play.c to check for NULL as well.
memset(&pt->wn, 0, sizeof(struct writer_node));
task_reap(&pt->fn.task);
- decoder->close(&pt->fn);
+ if (decoder->close)
+ decoder->close(&pt->fn);
btr_remove_node(&pt->fn.btrn);
free(pt->fn.conf);
memset(&pt->fn, 0, sizeof(struct filter_node));