[SCM] handbrake/master: debian/patches: Add some patches for compilation of future versions of hb.

rbrito-guest at users.alioth.debian.org rbrito-guest at users.alioth.debian.org
Sat Jun 2 03:09:06 UTC 2012


The following commit has been merged in the master branch:
commit a9ac82b162bd02844a1d502661b9422f3bd5fd14
Author: Rogério Brito <rbrito at ime.usp.br>
Date:   Sat Jun 2 00:05:34 2012 -0300

    debian/patches: Add some patches for compilation of future versions of hb.
    
    Signed-off-by: Rogério Brito <rbrito at ime.usp.br>

diff --git a/debian/patches/0007-Fix-for-compilation-with-Debian-s-libbluray.patch b/debian/patches/0007-Fix-for-compilation-with-Debian-s-libbluray.patch
new file mode 100644
index 0000000..85f601e
--- /dev/null
+++ b/debian/patches/0007-Fix-for-compilation-with-Debian-s-libbluray.patch
@@ -0,0 +1,49 @@
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito at ime.usp.br>
+Date: Fri, 1 Jun 2012 23:33:17 -0300
+Subject: Fix for compilation with Debian's libbluray.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch puts dummy values in calls that the development versions of
+HandBrake make to libbluray, as they use a different version of the library,
+with a different API (this new one needs more arguments to use a finer
+granularity selecting titles from the discs).
+
+Note that the values that I put here are simply dummy values (zeros,
+actually) that I can't test, as I don't have any bluray disc, let alone a
+bluray drive.
+
+Others should review this patch for unintended side-effects.
+
+Signed-off-by: Rogério Brito <rbrito at ime.usp.br>
+---
+ libhb/bd.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libhb/bd.c b/libhb/bd.c
+index 782e2d5..9e2e412 100644
+--- a/libhb/bd.c
++++ b/libhb/bd.c
+@@ -51,7 +51,7 @@ hb_bd_t * hb_bd_init( char * path )
+         goto fail;
+     }
+ 
+-    d->title_count = bd_get_titles( d->bd, TITLES_RELEVANT );
++    d->title_count = bd_get_titles( d->bd, 0, TITLES_RELEVANT );
+     if ( d->title_count == 0 )
+     {
+         hb_log( "bd: not a bd - trying as a stream/file instead" );
+@@ -60,7 +60,7 @@ hb_bd_t * hb_bd_init( char * path )
+     d->title_info = calloc( sizeof( BLURAY_TITLE_INFO* ) , d->title_count );
+     for ( ii = 0; ii < d->title_count; ii++ )
+     {
+-        d->title_info[ii] = bd_get_title_info( d->bd, ii );
++        d->title_info[ii] = bd_get_title_info( d->bd, ii, 0 );
+     }
+     qsort(d->title_info, d->title_count, sizeof( BLURAY_TITLE_INFO* ), title_info_compare_mpls );
+     d->path = strdup( path );
+-- 
+1.7.10
+
+
diff --git a/debian/patches/0008-Fix-for-compilation-with-Debian-s-libdca.patch b/debian/patches/0008-Fix-for-compilation-with-Debian-s-libdca.patch
new file mode 100644
index 0000000..c32a3e1
--- /dev/null
+++ b/debian/patches/0008-Fix-for-compilation-with-Debian-s-libdca.patch
@@ -0,0 +1,45 @@
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito at ime.usp.br>
+Date: Fri, 1 Jun 2012 23:47:34 -0300
+Subject: Fix for compilation with Debian's libdca.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Since libdca is maintained by pkg-multimedia, we may be willing to select
+parts of HandBrake's contrib/libdca/A00-general.patch for inclusion on the
+library that we ship.
+
+Signed-off-by: Rogério Brito <rbrito at ime.usp.br>
+---
+ libhb/decdca.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/libhb/decdca.c b/libhb/decdca.c
+index a459dcd..ee21d31 100644
+--- a/libhb/decdca.c
++++ b/libhb/decdca.c
+@@ -9,6 +9,11 @@
+ 
+ #include "dca.h"
+ 
++// Taken from HandBrake's patch to libdecdca
++#define DCA_OUT_DPLI  0x200
++#define DCA_OUT_DPLII 0x400
++
++
+ struct hb_work_private_s
+ {
+     hb_job_t    * job;
+@@ -309,7 +314,7 @@ static hb_buffer_t * Decode( hb_work_object_t * w )
+ 
+     for( i = 0; i < num_blocks; i++ )
+     {
+-        dca_sample_t * samples_in;
++        sample_t * samples_in;
+         float    * samples_out;
+ 
+         dca_block( pv->state );
+-- 
+1.7.10
+
+
diff --git a/debian/patches/0009-Remove-forcing-PGS-subtitles-to-be-included.patch b/debian/patches/0009-Remove-forcing-PGS-subtitles-to-be-included.patch
new file mode 100644
index 0000000..0fd5078
--- /dev/null
+++ b/debian/patches/0009-Remove-forcing-PGS-subtitles-to-be-included.patch
@@ -0,0 +1,52 @@
+From: =?UTF-8?q?Rog=C3=A9rio=20Brito?= <rbrito at ime.usp.br>
+Date: Fri, 1 Jun 2012 23:53:42 -0300
+Subject: Remove forcing PGS subtitles to be included.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This needs a not-so short patch to libav/ffmpeg to be handled. I guess that
+the libraries aren't up to what the multimedia applications need.
+
+But then, I have *not* studied if the libraries offer any other, perhaps
+superior, alternative to what handbrake is doing here.
+
+Signed-off-by: Rogério Brito <rbrito at ime.usp.br>
+---
+ libhb/decpgssub.c |   12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/libhb/decpgssub.c b/libhb/decpgssub.c
+index c5bb626..4b218ea 100644
+--- a/libhb/decpgssub.c
++++ b/libhb/decpgssub.c
+@@ -218,10 +218,6 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+             if (subtitle.num_rects != 0)
+             {
+                 w->subtitle->hits++;
+-                if (subtitle.forced)
+-                {
+-                    w->subtitle->forced_hits++;
+-                }
+             }
+             else
+             {
+@@ -234,13 +230,9 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in,
+             }
+             else if (w->subtitle->config.force)
+             {
+-                useable_sub = subtitle.forced || pv->seen_forced_sub;
++                useable_sub = pv->seen_forced_sub;
+                 // note if we find forced or empty subtitles
+-                if (subtitle.forced)
+-                {
+-                    pv->seen_forced_sub = 1;
+-                }
+-                else if (!subtitle.num_rects)
++                if (!subtitle.num_rects)
+                 {
+                     pv->seen_forced_sub = 0;
+                 }
+-- 
+1.7.10
+
diff --git a/debian/patches/series b/debian/patches/series
index 2beb695..ff6954a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,6 @@
 0004-Enable-compilation-on-Debian-arches-other-than-Linux.patch
 0005-libhb-Fix-compilation-with-mp4v2-v1.9.1.patch
 0006-LinGUI-Allow-user-to-pass-libavcodec-settings-also-w.patch
+#0007-Fix-for-compilation-with-Debian-s-libbluray.patch
+#0008-Fix-for-compilation-with-Debian-s-libdca.patch
+#0009-Remove-forcing-PGS-subtitles-to-be-included.patch

-- 
handbrake packaging



More information about the pkg-multimedia-commits mailing list