]> git.tue.mpg.de Git - paraslash.git/commitdiff
oggdec: Trivial cleanups.
authorAndre Noll <maan@systemlinux.org>
Sun, 22 May 2011 09:20:30 +0000 (11:20 +0200)
committerAndre Noll <maan@systemlinux.org>
Tue, 16 Aug 2011 18:00:23 +0000 (20:00 +0200)
oggdec_filter.c

index 042e13b001796821f424547bb73710c827b1ec67..6f416182f927db1e19e3e04643d0a9afa2d4abf3 100644 (file)
@@ -92,24 +92,22 @@ static const ov_callbacks ovc = {
 
 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;
 }