static void ogg_open(struct filter_node *fn)
{
- struct private_oggdec_data *pod = para_calloc(
- sizeof(struct private_oggdec_data));
-
- fn->private_data = pod;
+ fn->private_data = para_calloc(sizeof(struct private_oggdec_data));
fn->min_iqs = 8000;
}
static void ogg_close(struct filter_node *fn)
{
struct private_oggdec_data *pod = fn->private_data;
- if (pod->vf) {
+
+ if (pod && pod->vf) {
PARA_DEBUG_LOG("ov_clearing %p, pod = %p\n", pod->vf, pod);
ov_clear(pod->vf);
free(pod->vf);
pod->vf = NULL;
} else
PARA_DEBUG_LOG("nothing to close\n");
- free(fn->private_data);
+ free(pod);
fn->private_data = NULL;
}