forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-libs/aribb24-1.0.3-r2: Add unreleased bugfix patches
Signed-off-by: Hector Martin <[email protected]> Package-Manager: Portage-2.3.60, Repoman-2.3.12 Closes: gentoo#11091 Signed-off-by: Andreas Sturmlechner <[email protected]>
- Loading branch information
Showing
4 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Copyright 1999-2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit autotools multilib-minimal | ||
|
||
DESCRIPTION="Library for decoding ARIB STD-B24 subtitles" | ||
HOMEPAGE="https://github.com/nkoriyama/aribb24" | ||
SRC_URI="https://github.com/nkoriyama/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="LGPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" | ||
|
||
RDEPEND="media-libs/libpng:0=[${MULTILIB_USEDEP}]" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="virtual/pkgconfig" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-reset-control_time.patch | ||
"${FILESDIR}"/${P}-fix-default-macros.patch | ||
"${FILESDIR}"/${P}-add-missing-curly-braces.patch | ||
) | ||
|
||
src_prepare() { | ||
default | ||
eautoreconf | ||
} | ||
|
||
multilib_src_configure() { | ||
ECONF_SOURCE="${S}" econf --disable-static | ||
} | ||
|
||
multilib_src_install_all() { | ||
find "${D}" -name '*.la' -delete || die | ||
} |
27 changes: 27 additions & 0 deletions
27
media-libs/aribb24/files/aribb24-1.0.3-add-missing-curly-braces.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From ad161e98700b31e262db3f9ac2dd4e9761602faa Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <[email protected]> | ||
Date: Sun, 17 Feb 2019 23:13:00 +0200 | ||
Subject: [PATCH] decoder: add curly braces around a multi-line statement | ||
|
||
It seems like these are meant to be executed together when correct | ||
data is decoded. Right now it would always return one in this | ||
default case. | ||
--- | ||
src/decoder.c | 2 ++ | ||
1 file changed, 2 insertions(+) | ||
|
||
diff --git a/src/decoder.c b/src/decoder.c | ||
index 2b77f38..69ea351 100644 | ||
--- a/src/decoder.c | ||
+++ b/src/decoder.c | ||
@@ -1140,8 +1140,10 @@ static int decoder_handle_time( arib_decoder_t *decoder ) | ||
break; | ||
default: | ||
if( i_mode == 1 && c >= 0x40 && c <= 0x7F ) | ||
+ { | ||
decoder->i_control_time += c & 0x3f; | ||
return 1; | ||
+ } | ||
return 0; | ||
} | ||
if( i_mode == 0 ) |
31 changes: 31 additions & 0 deletions
31
media-libs/aribb24/files/aribb24-1.0.3-fix-default-macros.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From a5bcc6d17c20e18bdeec295089cc0cdfac9d35c8 Mon Sep 17 00:00:00 2001 | ||
From: xtne6f <[email protected]> | ||
Date: Thu, 7 Feb 2019 20:11:13 +0900 | ||
Subject: [PATCH] Fix default macros | ||
|
||
--- | ||
src/decoder_macro.h | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/decoder_macro.h b/src/decoder_macro.h | ||
index 86edee4..513b81e 100644 | ||
--- a/src/decoder_macro.h | ||
+++ b/src/decoder_macro.h | ||
@@ -30,7 +30,7 @@ static const unsigned char decoder_default_macro_1[] = { | ||
0x1B,0x24,0x39,0x1B,0x29,0x31,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
}; | ||
static const unsigned char decoder_default_macro_2[] = { | ||
- 0x1B,0x24,0x39,0x1B,0x29,0x20,0x40,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
+ 0x1B,0x24,0x39,0x1B,0x29,0x20,0x41,0x1B,0x2A,0x30,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
}; | ||
static const unsigned char decoder_default_macro_3[] = { | ||
0x1B,0x28,0x32,0x1B,0x29,0x34,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
@@ -39,7 +39,7 @@ static const unsigned char decoder_default_macro_4[] = { | ||
0x1B,0x28,0x32,0x1B,0x29,0x33,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
}; | ||
static const unsigned char decoder_default_macro_5[] = { | ||
- 0x1B,0x28,0x32,0x1B,0x29,0x20,0x40,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
+ 0x1B,0x28,0x32,0x1B,0x29,0x20,0x41,0x1B,0x2A,0x35,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D | ||
}; | ||
static const unsigned char decoder_default_macro_6[] = { | ||
0x1B,0x28,0x20,0x41,0x1B,0x29,0x20,0x42,0x1B,0x2A,0x20,0x43,0x1B,0x2B,0x20,0x70,0x0F,0x1B,0x7D |
23 changes: 23 additions & 0 deletions
23
media-libs/aribb24/files/aribb24-1.0.3-reset-control_time.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
From facc51923d43f26dec09a9391566de7cba29f8db Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= <[email protected]> | ||
Date: Sun, 17 Feb 2019 22:42:31 +0200 | ||
Subject: [PATCH] decoder: reset control_time when finalizing decoder | ||
|
||
This way finalize_decoder() can properly be utilized as a flush | ||
function. | ||
--- | ||
src/decoder.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/src/decoder.c b/src/decoder.c | ||
index 2b77f38..24c0f06 100644 | ||
--- a/src/decoder.c | ||
+++ b/src/decoder.c | ||
@@ -1506,6 +1506,7 @@ void arib_finalize_decoder( arib_decoder_t* decoder ) | ||
free( p_region ); | ||
} | ||
decoder->p_region = NULL; | ||
+ decoder->i_control_time = 0; | ||
} | ||
|
||
size_t arib_decode_buffer( arib_decoder_t* decoder, |