[SCM] bs1770gain/master: Add 23-memleak.diff based on suggestion from upstream to reduce the memory leak.

pere at users.alioth.debian.org pere at users.alioth.debian.org
Wed Jun 3 10:14:46 UTC 2015


The following commit has been merged in the master branch:
commit 0b4da50ee64099368cc5fae9f4697e8ec3a6b04f
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Wed Jun 3 10:14:05 2015 +0000

    Add 23-memleak.diff based on suggestion from upstream to reduce the memory leak.

diff --git a/debian/patches/23-memleak.diff b/debian/patches/23-memleak.diff
new file mode 100644
index 0000000..a357802
--- /dev/null
+++ b/debian/patches/23-memleak.diff
@@ -0,0 +1,36 @@
+Description: Reduce memleak.
+ Patch based on suggestion from upstream.
+Author: Petter Reinholdtsen <pere at debian.org>
+Forwarded: not-needed
+Reviewed-By: Petter Reinholdtsen <pere at debian.org>
+Last-Update: 2015-06-03
+
+--- bs1770gain-0.4.1.orig/bs1770gain/bs1770gain.c
++++ bs1770gain-0.4.1/bs1770gain/bs1770gain.c
+@@ -605,6 +605,7 @@ int main(int argc, char **argv)
+ 
+   if (options.time)
+     fprintf(stderr, "Duration: %ld ms.\n",(t2-t1)/CLOCKS_PER_MILLIS);
++  sox_quit();
+ dynload:
+   if (NULL!=fpath)
+     fclose(options.f);
+--- bs1770gain-0.4.1.orig/libffsox-2/ffsox_source.c
++++ bs1770gain-0.4.1/libffsox-2/ffsox_source.c
+@@ -145,6 +145,7 @@ static int source_run(source_t *n)
+   case STATE_RUN:
+     for (;;) {
+       n->consumer.n=n->consumer.h;
++      av_free_packet(pkt);
+ 
+       if (av_read_frame(n->f.fc,pkt)<0) {
+         n->state=STATE_FLUSH;
+@@ -176,8 +177,6 @@ static int source_run(source_t *n)
+ 
+         LIST_NEXT(&n->consumer.n,n->consumer.h);
+       }
+-
+-      av_free_packet(pkt);
+     }
+   case STATE_FLUSH:
+   flush:
diff --git a/debian/patches/series b/debian/patches/series
index 81973e0..24cfbac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 20-memleak-album.diff
 21-accesss-freed-mem.diff
 22-disable-dynload.diff
+23-memleak.diff

-- 
bs1770gain packaging



More information about the pkg-multimedia-commits mailing list