[Frugalware-git] frugalware-0.9: mplayer-1.0rc2-7solaria2-i686

Miklos Vajna vmiklos at frugalware.org
Tue Jan 13 16:34:50 CET 2009


Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-0.9.git;a=commitdiff;h=c372e501da5c488827a50f6fa9ff8eaead4fe395

commit c372e501da5c488827a50f6fa9ff8eaead4fe395
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Tue Jan 13 16:34:29 2009 +0100

mplayer-1.0rc2-7solaria2-i686

- add fix-for-vqf-demuxer-crashes.patch (closes #3524)
- add ivtv_2.6.24.patch (fixes FTBFS)

Conflicts:

source/xapps/mplayer/FrugalBuild

diff --git a/source/xapps/mplayer/FrugalBuild b/source/xapps/mplayer/FrugalBuild
index 19cab0d..830d713 100644
--- a/source/xapps/mplayer/FrugalBuild
+++ b/source/xapps/mplayer/FrugalBuild
@@ -5,7 +5,7 @@ pkgname=mplayer
_F_archive_name=MPlayer
pkgver=1.0rc2
pkgextraver=
-pkgrel=7solaria1
+pkgrel=7solaria2
pkgdesc="The Movie Player"
url="http://www.mplayerhq.hu/"
depends=('mesa' 'fontconfig' 'libstdc++' 'libdv' 'termcap' 'libjpeg' 'libmad' \
@@ -31,7 +31,9 @@ source=(http://www.mplayerhq.hu/MPlayer/releases/$_F_archive_name-$pkgver$pkgext
http://www.mplayerhq.hu/MPlayer/patches/demux_audio_fix_20080129.diff \
http://www.mplayerhq.hu/MPlayer/patches/stream_cddb_fix_20080120.diff \
CVE-2008-0073.diff \
-	http://www.ocert.org/patches/2008-013/mplayer_demux_real.patch)
+	http://www.ocert.org/patches/2008-013/mplayer_demux_real.patch \
+	fix-for-vqf-demuxer-crashes.patch \
+	ivtv_2.6.24.patch)
sha1sums=('e9b496f3527c552004ec6d01d6b43f196b43ce2d' \
'45e5ee7a5541a5f1cfd2678a6c9b5911ca473cb9' \
'ccf11dce5d0fb72fd3af97f788b7471cd0cd0b68' \
@@ -43,7 +45,9 @@ sha1sums=('e9b496f3527c552004ec6d01d6b43f196b43ce2d' \
'e25ba7d8d696d9c6365f105134ba723404adb4e1' \
'8d901c7a88fa120ed26492e741e1ae0fbe57e12d' \
'df2d0c46a73be32ec5e3d575532c34b939a79d5f' \
-          '3139c1c13d411cbacef9a9d050c9df87431aba71')
+          '3139c1c13d411cbacef9a9d050c9df87431aba71' \
+          '19f886cddc59a6f7ef5b9c4c1cdb731ec481fe13' \
+          'dbb1eab7de79cbff3a15eeb8acbe34a853800afa')

# To add v4l support.
# mknod -m 660 /dev/video0 c 81 0
diff --git a/source/xapps/mplayer/fix-for-vqf-demuxer-crashes.patch b/source/xapps/mplayer/fix-for-vqf-demuxer-crashes.patch
new file mode 100644
index 0000000..2356263
--- /dev/null
+++ b/source/xapps/mplayer/fix-for-vqf-demuxer-crashes.patch
@@ -0,0 +1,55 @@
+--- 1.0rc2/libmpdemux/demux_vqf.c	2007/10/07 16:27:03	24723
++++ 1.0rc2/libmpdemux/demux_vqf.c	2008/12/14 15:18:41	28150
+@@ -50,11 +50,14 @@
+     unsigned chunk_size;
+     hi->size=chunk_size=stream_read_dword(s); /* include itself */
+     stream_read(s,chunk_id,4);
++    if (chunk_size < 8) return NULL;
++    chunk_size -= 8;
+     if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('C','O','M','M'))
+     {
+-    char buf[chunk_size-8];
++    char buf[BUFSIZ];
+     unsigned i,subchunk_size;
+-    if(stream_read(s,buf,chunk_size-8)!=chunk_size-8) return NULL;
++    if (chunk_size > sizeof(buf) || chunk_size < 20) return NULL;
++    if(stream_read(s,buf,chunk_size)!=chunk_size) return NULL;
+     i=0;
+     subchunk_size=be2me_32(*((uint32_t *)&buf[0]));
+     hi->channelMode=be2me_32(*((uint32_t *)&buf[4]));
+@@ -83,13 +86,15 @@
+     sh_audio->samplesize = 4;
+     w->wBitsPerSample = 8*sh_audio->samplesize;
+     w->cbSize = 0;
++    if (subchunk_size > chunk_size - 4) continue;
+     i+=subchunk_size+4;
+-    while(i<chunk_size-8)
++    while(i + 8 < chunk_size)
+     {
+         unsigned slen,sid;
+-        char sdata[chunk_size];
++        char sdata[BUFSIZ];
+         sid=*((uint32_t *)&buf[i]); i+=4;
+         slen=be2me_32(*((uint32_t *)&buf[i])); i+=4;
++        if (slen > sizeof(sdata) - 1 || slen > chunk_size - i) break;
+         if(sid==mmioFOURCC('D','S','I','Z'))
+         {
+         hi->Dsiz=be2me_32(*((uint32_t *)&buf[i]));
+@@ -141,7 +146,7 @@
+     if(*((uint32_t *)&chunk_id[0])==mmioFOURCC('D','A','T','A'))
+     {
+     demuxer->movi_start=stream_tell(s);
+-    demuxer->movi_end=demuxer->movi_start+chunk_size-8;
++    demuxer->movi_end=demuxer->movi_start+chunk_size;
+     mp_msg(MSGT_DEMUX, MSGL_V, "Found data at %"PRIX64" size %"PRIu64"\n",demuxer->movi_start,demuxer->movi_end);
+     /* Done! play it */
+     break;
+@@ -149,7 +154,7 @@
+     else
+     {
+     mp_msg(MSGT_DEMUX, MSGL_V, "Unhandled chunk '%c%c%c%c' %u bytes\n",((char *)&chunk_id)[0],((char *)&chunk_id)[1],((char *)&chunk_id)[2],((char *)&chunk_id)[3],chunk_size);
+-    stream_skip(s,chunk_size-8); /*unknown chunk type */
++    stream_skip(s,chunk_size); /*unknown chunk type */
+     }
+   }
+
diff --git a/source/xapps/mplayer/ivtv_2.6.24.patch b/source/xapps/mplayer/ivtv_2.6.24.patch
new file mode 100644
index 0000000..4e0a3fe
--- /dev/null
+++ b/source/xapps/mplayer/ivtv_2.6.24.patch
@@ -0,0 +1,33 @@
+Patch to account for linux-2.6.24.x including ivtv, but MPlayer won't
+build against it.  See this link for more information and the origin
+of the patch:
+http://archives.free.net.ph/message/20080201.201454.1047775e.en.html
+Thanks to Robby Workman for pointing me to this one.
+
+diff -Nur MPlayer-1.0rc2.orig/configure MPlayer-1.0rc2/configure
+---  MPlayer-1.0rc2.orig/configure	2007-10-07 21:49:33.000000000 +0200
++++  MPlayer-1.0rc2/configure	2008-03-10 10:27:29.000000000 +0100
+@@ -4920,7 +4920,7 @@
+ echores "$_dxr3"
+
+
+-echocheck "IVTV TV-Out"
++echocheck "IVTV TV-Out (pre linux-2.6.24)"
+ if test "$_ivtv" = auto ; then
+   cat > $TMPC << EOF
+ #include <stdlib.h>
+@@ -4928,7 +4928,13 @@
+ #include <linux/types.h>
+ #include <linux/videodev2.h>
+ #include <linux/ivtv.h>
+-int main(void) { return 0; }
++#include <sys/ioctl.h>
++int main(void) {
++struct ivtv_cfg_stop_decode sd;
++struct ivtv_cfg_start_decode sd1;
++ioctl (0, IVTV_IOC_START_DECODE, &sd1);
++ioctl (0, IVTV_IOC_STOP_DECODE, &sd);
++return 0; }
+ EOF
+   _ivtv=no
+   cc_check && _ivtv=yes


More information about the Frugalware-git mailing list