aboutsummaryrefslogtreecommitdiffstats
path: root/main/mplayer
diff options
context:
space:
mode:
Diffstat (limited to 'main/mplayer')
-rw-r--r--main/mplayer/APKBUILD20
-rw-r--r--main/mplayer/mplayer-libpng-1.5.patch41
2 files changed, 55 insertions, 6 deletions
diff --git a/main/mplayer/APKBUILD b/main/mplayer/APKBUILD
index c7eff9e030..28907bcdb3 100644
--- a/main/mplayer/APKBUILD
+++ b/main/mplayer/APKBUILD
@@ -2,7 +2,7 @@
pkgname=mplayer
pkgver=1.0_rc4
_ver=${pkgver%_*}${pkgver#*_}
-pkgrel=3
+pkgrel=4
pkgdesc="A movie player for linux"
url="http://www.mplayerhq.hu/"
arch="all"
@@ -14,11 +14,18 @@ makedepends="libxxf86dga-dev libxv-dev libmad-dev lame-dev libao-dev
x264-dev faac-dev ttf-dejavu libxvmc-dev alsa-lib-dev live-media-dev
mesa-dev"
-# cdparanoia libcaca lirc-utils libgl-dev smbclient-dev
-# aalib-dev jack-audio-connection-kit libmng-dev libxss-dev
-
-source="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-$_ver.tar.bz2"
+source="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-$_ver.tar.bz2
+ mplayer-libpng-1.5.patch
+ "
_builddir="$srcdir"/MPlayer-$_ver
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) patch -p1 -i "$srcdir"/$i || return 1 ;;
+ esac;
+ done
+}
build() {
cd "$_builddir"
@@ -67,4 +74,5 @@ package() {
"$pkgdir"/usr/share/mplayer/subfont.ttf || return 1
rm -rf "$pkgdir"/usr/share/mplayer/font
}
-md5sums="1699c94de39da9c4c5d34e8f58e418f0 MPlayer-1.0rc4.tar.bz2"
+md5sums="1699c94de39da9c4c5d34e8f58e418f0 MPlayer-1.0rc4.tar.bz2
+f3f3bae09f6cee684ced1dbc7d7ed23c mplayer-libpng-1.5.patch"
diff --git a/main/mplayer/mplayer-libpng-1.5.patch b/main/mplayer/mplayer-libpng-1.5.patch
new file mode 100644
index 0000000000..704c64c97a
--- /dev/null
+++ b/main/mplayer/mplayer-libpng-1.5.patch
@@ -0,0 +1,41 @@
+diff --git a/libmpcodecs/vd_mpng.c b/libmpcodecs/vd_mpng.c
+index 13dcfdb..c430566 100644
+--- a/libmpcodecs/vd_mpng.c
++++ b/libmpcodecs/vd_mpng.c
+@@ -74,7 +74,7 @@ static int pngLength;
+
+ static void pngReadFN( png_structp pngstr,png_bytep buffer,png_size_t size )
+ {
+- char * p = pngstr->io_ptr;
++ char * p = png_get_io_ptr(pngstr);
+ if(size>pngLength-pngPointer && pngLength>=pngPointer) size=pngLength-pngPointer;
+ fast_memcpy( buffer,(char *)&p[pngPointer],size );
+ pngPointer+=size;
+@@ -90,6 +90,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
+ png_uint_32 png_width=0,png_height=0;
+ int depth,color;
+ png_uint_32 i;
++ png_byte color_type;
+ mp_image_t* mpi;
+
+ int cols;
+@@ -111,7 +112,9 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
+ png_get_IHDR( png,info,&png_width,&png_height,&depth,&color,NULL,NULL,NULL );
+ png_set_bgr( png );
+
+- switch( info->color_type ) {
++ color_type=png_get_color_type(png, info);
++
++ switch( color_type ) {
+ case PNG_COLOR_TYPE_GRAY_ALPHA:
+ mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry gray scaled png with alpha channel not supported at moment.\n" );
+ break;
+@@ -128,7 +131,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
+ out_fmt=IMGFMT_BGR24;
+ break;
+ default:
+- mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry, unsupported PNG colorspace: %d.\n" ,info->color_type);
++ mp_msg( MSGT_DECVIDEO,MSGL_INFO,"Sorry, unsupported PNG colorspace: %d.\n" ,color_type);
+ }
+
+ // (re)init libvo if image parameters changed (width/height/colorspace)