[arch-commits] CVS update of extra/multimedia/mplayer (5 files)

Thomas Baechler thomas at archlinux.org
Sun Sep 16 17:01:01 UTC 2007


    Date: Sunday, September 16, 2007 @ 13:01:01
  Author: thomas
    Path: /home/cvs-extra/extra/multimedia/mplayer

   Added: aviheader.patch (1.1)
Modified: PKGBUILD (1.11 -> 1.12)
 Removed: ChangeLog (1.1) mplayer-lirc-libdl.diff (1.1) mplayer.install (1.1)

upgpkg: mplayer 1.0rc1-8


-------------------------+
 ChangeLog               |    5 
 PKGBUILD                |   26 +--
 aviheader.patch         |   24 ++
 mplayer-lirc-libdl.diff |  377 ----------------------------------------------
 mplayer.install         |   11 -
 5 files changed, 36 insertions(+), 407 deletions(-)


Index: extra/multimedia/mplayer/ChangeLog
diff -u extra/multimedia/mplayer/ChangeLog:1.1 extra/multimedia/mplayer/ChangeLog:removed
--- extra/multimedia/mplayer/ChangeLog:1.1	Thu Jun  7 09:24:48 2007
+++ extra/multimedia/mplayer/ChangeLog	Sun Sep 16 13:01:01 2007
@@ -1,5 +0,0 @@
-
-Changes in 1.0rc1-6
-- add dts support
-- add live-media support
-- fix cddb vulnerability (1.0rc1try3)
Index: extra/multimedia/mplayer/PKGBUILD
diff -u extra/multimedia/mplayer/PKGBUILD:1.11 extra/multimedia/mplayer/PKGBUILD:1.12
--- extra/multimedia/mplayer/PKGBUILD:1.11	Fri Jun 22 14:33:37 2007
+++ extra/multimedia/mplayer/PKGBUILD	Sun Sep 16 13:01:01 2007
@@ -1,36 +1,35 @@
-# $Id: PKGBUILD,v 1.11 2007/06/22 18:33:37 varun Exp $
-# Maintainer: dorphell <dorphell at archlinux.org>
+# $Id: PKGBUILD,v 1.12 2007/09/16 17:01:01 thomas Exp $
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
 pkgname=mplayer
 pkgver=1.0rc1
-pkgrel=7.1
+pkgrel=8
 pkgdesc="A movie player for linux"
 arch=(i686 x86_64)
 depends=('libxxf86dga' 'libxv' 'libmad' 'libungif' 'cdparanoia' 'gtk2'
-         'codecs' 'sdl' 'lame' 'libtheora' 'ttf-bitstream-vera' 'xvidcore'
+         'sdl' 'lame' 'libtheora' 'ttf-bitstream-vera' 'xvidcore'
          'libgl' 'smbclient' 'aalib' 'dbus-glib' 'jack-audio-connection-kit'
-         'x264>=20070616' 'faac')
-makedepends=('lirc-utils>=0.8.2' 'libcaca' 'unzip' 'live-media' 'libdts')
+         'x264>=20070616' 'faac' 'lirc-utils')
+makedepends=('libcaca' 'unzip' 'live-media' 'libdts')
 backup=('etc/mplayer/codecs.conf' 'etc/mplayer/input.conf')
 source=(ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-${pkgver}.tar.bz2
         ftp://ftp1.mplayerhq.hu/MPlayer/skins/Blue-1.7.tar.bz2
-        mplayer-lirc-libdl.diff aalib-configure.patch
+        aalib-configure.patch
         MPlayer-1.0rc1-gnome-screensaver.patch
         http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip
         http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip
         http://www.mplayerhq.hu/MPlayer/patches/asmrules_fix_20061231.diff
         http://www.mplayerhq.hu/MPlayer/patches/cddb_fix_20070605.diff
-	dmo.patch)
+	dmo.patch aviheader.patch)
 md5sums=('18c05d88e22c3b815a43ca8d7152ccdc'
          'e4e2020d11b681aac898103b3ba723c4'
-         'fda186b412a76695338a17e673b96cc4'
          'fa8cd2a04b994a5d74bec60f6efd59e4'
          'a5f3a87cff594f9ed69a3453f5630bec'
          '9b575d01f94f50dd4dcf570cd8a14dda'
          '607a14d090898ffb0f72c1aa6aa6ce31'
          'f0b71c38b1207c1d604be091876ac051'
          'bd8a233ea31c6686a956387ad28c5c5c'
-         '86b7dc64d7d21b241bbff32b423dcc12')
-install=$pkgname.install
+         '86b7dc64d7d21b241bbff32b423dcc12'
+         '8d432e2e56384d2a99dcdaf843f43ef4')
 url="http://www.mplayerhq.hu/"
 
 build() {
@@ -45,13 +44,12 @@
   patch -Np1 -i ../dmo.patch || return 1
   # fix cddb vulnerability
   patch -p0 -i ../cddb_fix_20070605.diff
-  # Make lirc-utils dependency optional
-  [ "$CARCH" = "x86_64" ] &&  sed -i -e "s/(CFLAGS) -llirc_client/(CFLAGS) -fPIC -llirc_client/" ../mplayer-lirc-libdl.diff
-  patch -p1 -i ../mplayer-lirc-libdl.diff || return 1
   # Fix aalib
   patch -p1 -i ../aalib-configure.patch || return 1
   # Add support for gnome screensaver
   patch -p1 -i ../MPlayer-1.0rc1-gnome-screensaver.patch || return 1
+  # Fix security issue in the avi demuxer
+  patch -Np1 -i ../aviheader.patch
 
   # Add support for AMR codecs (3gp videos)
   mkdir libavcodec/amr_float libavcodec/amrwb_float
Index: extra/multimedia/mplayer/aviheader.patch
diff -u /dev/null extra/multimedia/mplayer/aviheader.patch:1.1
--- /dev/null	Sun Sep 16 13:01:01 2007
+++ extra/multimedia/mplayer/aviheader.patch	Sun Sep 16 13:01:01 2007
@@ -0,0 +1,24 @@
+--- trunk/libmpdemux/aviheader.c	2007/08/01 09:01:28	23985
++++ trunk/libmpdemux/aviheader.c	2007/09/13 15:18:57	24447
+@@ -233,16 +233,16 @@
+ 	  
+       print_avisuperindex_chunk(s,MSGL_V);
+       
+-      if( ((chunksize/4)/s->wLongsPerEntry) < s->nEntriesInUse){
+-        mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk\n");
+-        s->nEntriesInUse = (chunksize/4)/s->wLongsPerEntry;
+-      }
+-
+       // Check and fix this useless crap
+       if(s->wLongsPerEntry != sizeof (avisuperindex_entry)/4) {
+           mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk size: %u\n",s->wLongsPerEntry);
+           s->wLongsPerEntry = sizeof(avisuperindex_entry)/4;
+       }
++      if( ((chunksize/4)/s->wLongsPerEntry) < s->nEntriesInUse){
++        mp_msg (MSGT_HEADER, MSGL_WARN, "Broken super index chunk\n");
++        s->nEntriesInUse = (chunksize/4)/s->wLongsPerEntry;
++      }
++
+       s->aIndex = calloc(s->nEntriesInUse, sizeof (avisuperindex_entry));
+       s->stdidx = calloc(s->nEntriesInUse, sizeof (avistdindex_chunk));
+ 
Index: extra/multimedia/mplayer/mplayer-lirc-libdl.diff
diff -u extra/multimedia/mplayer/mplayer-lirc-libdl.diff:1.1 extra/multimedia/mplayer/mplayer-lirc-libdl.diff:removed
--- extra/multimedia/mplayer/mplayer-lirc-libdl.diff:1.1	Sat Oct 28 18:51:42 2006
+++ extra/multimedia/mplayer/mplayer-lirc-libdl.diff	Sun Sep 16 13:01:01 2007
@@ -1,377 +0,0 @@
-diff -Nur MPlayer-1.0rc1.old/Makefile MPlayer-1.0rc1.new/Makefile
---- MPlayer-1.0rc1.old/Makefile	2006-10-23 00:32:31.000000000 +0200
-+++ MPlayer-1.0rc1.new/Makefile	2006-10-26 00:40:20.000000000 +0200
-@@ -410,6 +410,7 @@
- 	$(CC) -DCODECS2HTML codec-cfg.c mp_msg.o -o $@
- 
- install: $(ALL_PRG)
-+	$(MAKE) -C input install
- ifeq ($(VIDIX),yes)
- 	$(MAKE) -C libdha install
- 	$(MAKE) -C vidix install
-diff -Nur MPlayer-1.0rc1.old/configure MPlayer-1.0rc1.new/configure
---- MPlayer-1.0rc1.old/configure	2006-10-23 00:32:31.000000000 +0200
-+++ MPlayer-1.0rc1.new/configure	2006-10-26 00:40:20.000000000 +0200
-@@ -7382,7 +7382,7 @@
- fi
- if test "$_lirc" = yes ; then
-   _def_lirc='#define HAVE_LIRC 1'
--  _ld_lirc='-llirc_client'
-+  #_ld_lirc='-llirc_client'
- else
-   _def_lirc='#undef HAVE_LIRC'
- fi
-diff -Nur MPlayer-1.0rc1.old/input/Makefile MPlayer-1.0rc1.new/input/Makefile
---- MPlayer-1.0rc1.old/input/Makefile	2006-10-23 00:32:25.000000000 +0200
-+++ MPlayer-1.0rc1.new/input/Makefile	2006-10-26 00:58:46.000000000 +0200
-@@ -2,6 +2,7 @@
- include ../config.mak
- 
- LIBNAME = libinput.a
-+LIBSRCS = 
- 
- SRCS=input.c
- ifeq ($(JOYSTICK),yes)
-@@ -9,26 +10,31 @@
- endif
- ifeq ($(LIRC),yes)
- SRCS += lirc.c
-+LIBSRCS += lirc-dl.c
- endif
- 
- OBJS=$(SRCS:.c=.o)
-+SHAREDOBJS=$(LIBSRCS:.c=.so)
- 
- CFLAGS  = -I. -I.. $(OPTFLAGS)
- 
--.SUFFIXES: .c .o
-+.SUFFIXES: .c .o .so
- 
- 
- .c.o:
- 	$(CC) -c $(CFLAGS) -o $@ $<
- 
-+all:    $(LIBNAME) $(SHAREDOBJS)
-+
- $(LIBNAME):     $(OBJS)
- 	$(AR) r $(LIBNAME) $(OBJS)
- 	$(RANLIB) $(LIBNAME)
- 
--all:    $(LIBNAME)
-+lirc-dl.so: lirc-dl.c lirc-dl.h
-+	$(CC) $(CFLAGS) -llirc_client -shared -o $@ $<
- 
- clean:
--	rm -f *.o *.a *~
-+	rm -f *.o *.a *.so *~
- 
- distclean: clean
- 	rm -f .depend
-@@ -38,6 +44,10 @@
- depend:
- 	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
- 
-+install:
-+	$(INSTALL) -d $(LIBDIR)/mplayer
-+	$(INSTALL) -m 755 $(INSTALLSTRIP) -p *.so $(LIBDIR)/mplayer
-+
- #
- # include dependency files if they exist
- #
-diff -Nur MPlayer-1.0rc1.old/input/lirc-dl.c MPlayer-1.0rc1.new/input/lirc-dl.c
---- MPlayer-1.0rc1.old/input/lirc-dl.c	1970-01-01 01:00:00.000000000 +0100
-+++ MPlayer-1.0rc1.new/input/lirc-dl.c	2006-10-26 00:51:48.000000000 +0200
-@@ -0,0 +1,122 @@
-+
-+#include "config.h"
-+
-+#include <lirc/lirc_client.h>
-+#include <errno.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/types.h>
-+#include <sys/time.h>
-+#include <stdlib.h>
-+
-+#include "lirc-dl.h"
-+#include "mp_msg.h"
-+#include "help_mp.h"
-+#include "input.h"
-+
-+static struct lirc_config *lirc_config;
-+extern char *lirc_configfile;
-+
-+static char* cmd_buf = NULL;
-+
-+int 
-+mp_input_lirc_dl_init(void) {
-+  int lirc_sock;
-+
-+  mp_msg(MSGT_LIRC,MSGL_V,MSGTR_SettingUpLIRC);
-+  if((lirc_sock=lirc_init("mplayer",1))==-1){
-+    mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed);
-+    return -1;
-+  }
-+
-+  if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
-+    mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr,
-+		    lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
-+    lirc_deinit();
-+    return -1;
-+  }
-+
-+  return lirc_sock;
-+}
-+
-+int mp_input_lirc_dl_read(int fd,char* dest, int s) {
-+  fd_set fds;
-+  struct timeval tv;
-+  int r,cl = 0;
-+  char *code = NULL,*c = NULL;
-+
-+  // We have something in the buffer return it
-+  if(cmd_buf != NULL) {
-+    int l = strlen(cmd_buf), w = l > s ? s : l;
-+    memcpy(dest,cmd_buf,w);
-+    l -= w;
-+    if(l > 0)
-+      memmove(cmd_buf,&cmd_buf[w],l+1);
-+    else {
-+      free(cmd_buf);
-+      cmd_buf = NULL;
-+    }
-+    return w;
-+  }
-+      
-+  // Nothing in the buffer, pool the lirc fd
-+  FD_ZERO(&fds);
-+  FD_SET(fd,&fds);
-+  memset(&tv,0,sizeof(tv));
-+  while((r = select(fd+1,&fds,NULL,NULL,&tv)) <= 0) {
-+    if(r < 0) {
-+      if(errno == EINTR)
-+	continue;
-+      mp_msg(MSGT_INPUT,MSGL_ERR,"Select error : %s\n",strerror(errno));
-+      return MP_INPUT_ERROR;
-+    } else
-+      return MP_INPUT_NOTHING;
-+  }
-+  
-+  // There's something to read
-+  if(lirc_nextcode(&code) != 0) {
-+    mp_msg(MSGT_INPUT,MSGL_ERR,"Lirc error :(\n");
-+    return MP_INPUT_DEAD;
-+  }
-+
-+  if(!code) return MP_INPUT_NOTHING;
-+
-+  // We put all cmds in a single buffer separated by \n
-+  while((r = lirc_code2char(lirc_config,code,&c))==0 && c!=NULL) {
-+    int l = strlen(c);
-+    if(l <= 0)
-+      continue;
-+    cmd_buf = realloc(cmd_buf,cl+l+2);
-+    memcpy(&cmd_buf[cl],c,l);
-+    cl += l+1;
-+    cmd_buf[cl-1] = '\n';
-+    cmd_buf[cl] = '\0';
-+  }
-+
-+  free(code);
-+
-+  if(r < 0)
-+    return MP_INPUT_DEAD;
-+  else if(cmd_buf) // return the first command in the buffer
-+    return mp_input_lirc_read(fd,dest,s);
-+  else
-+    return MP_INPUT_RETRY;
-+
-+}
-+
-+void
-+mp_input_lirc_dl_close(int fd) {
-+  if(cmd_buf) {
-+    free(cmd_buf);
-+    cmd_buf = NULL;
-+  }
-+  lirc_freeconfig(lirc_config);
-+  lirc_deinit();
-+}
-+
-+struct mp_input_lirc_functions lirc_dl_functions = {
-+  .init = &mp_input_lirc_dl_init,
-+  .read = &mp_input_lirc_dl_read,
-+  .close = &mp_input_lirc_dl_close
-+};
-diff -Nur MPlayer-1.0rc1.old/input/lirc-dl.h MPlayer-1.0rc1.new/input/lirc-dl.h
---- MPlayer-1.0rc1.old/input/lirc-dl.h	1970-01-01 01:00:00.000000000 +0100
-+++ MPlayer-1.0rc1.new/input/lirc-dl.h	2006-10-26 00:40:20.000000000 +0200
-@@ -0,0 +1,5 @@
-+struct mp_input_lirc_functions {
-+  int (*init)(void);
-+  int (*read)(int, char*, int);
-+  void (*close)(int);
-+};
-diff -Nur MPlayer-1.0rc1.old/input/lirc.c MPlayer-1.0rc1.new/input/lirc.c
---- MPlayer-1.0rc1.old/input/lirc.c	2006-10-23 00:32:25.000000000 +0200
-+++ MPlayer-1.0rc1.new/input/lirc.c	2006-10-26 00:52:01.000000000 +0200
-@@ -1,115 +1,46 @@
--
- #include "config.h"
-+#include "lirc-dl.h"
-+#include "input.h"
- 
--#include <lirc/lirc_client.h>
--#include <errno.h>
--#include <stdio.h>
--#include <string.h>
--#include <unistd.h>
--#include <sys/types.h>
--#include <sys/time.h>
-+#include <dlfcn.h>
- #include <stdlib.h>
- 
--#include "mp_msg.h"
--#include "help_mp.h"
--#include "input.h"
--
--static struct lirc_config *lirc_config;
-+static struct mp_input_lirc_functions *functions;
-+static void *lirc_handle;
- char *lirc_configfile;
- 
--static char* cmd_buf = NULL;
--
--int 
--mp_input_lirc_init(void) {
--  int lirc_sock;
--
--  mp_msg(MSGT_LIRC,MSGL_V,MSGTR_SettingUpLIRC);
--  if((lirc_sock=lirc_init("mplayer",1))==-1){
--    mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCopenfailed);
--    return -1;
-+int mp_input_lirc_init(void)
-+{
-+  if(functions==NULL)
-+  {
-+    lirc_handle = dlopen(MPLAYER_LIBDIR "/mplayer/lirc-dl.so", RTLD_LAZY);
-+    if(lirc_handle==NULL)
-+      return 0;
-+    functions = dlsym(lirc_handle, "lirc_dl_functions");
-+    if(functions==NULL)
-+      return 0;
-   }
--
--  if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
--    mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr,
--		    lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
--    lirc_deinit();
--    return -1;
--  }
--
--  return lirc_sock;
-+  if(functions->init!=NULL)
-+    return (*functions->init)();
-+  else
-+    return 0;
- }
- 
--int mp_input_lirc_read(int fd,char* dest, int s) {
--  fd_set fds;
--  struct timeval tv;
--  int r,cl = 0;
--  char *code = NULL,*c = NULL;
--
--  // We have something in the buffer return it
--  if(cmd_buf != NULL) {
--    int l = strlen(cmd_buf), w = l > s ? s : l;
--    memcpy(dest,cmd_buf,w);
--    l -= w;
--    if(l > 0)
--      memmove(cmd_buf,&cmd_buf[w],l+1);
--    else {
--      free(cmd_buf);
--      cmd_buf = NULL;
--    }
--    return w;
--  }
--      
--  // Nothing in the buffer, pool the lirc fd
--  FD_ZERO(&fds);
--  FD_SET(fd,&fds);
--  memset(&tv,0,sizeof(tv));
--  while((r = select(fd+1,&fds,NULL,NULL,&tv)) <= 0) {
--    if(r < 0) {
--      if(errno == EINTR)
--	continue;
--      mp_msg(MSGT_INPUT,MSGL_ERR,"Select error : %s\n",strerror(errno));
--      return MP_INPUT_ERROR;
--    } else
--      return MP_INPUT_NOTHING;
--  }
--  
--  // There's something to read
--  if(lirc_nextcode(&code) != 0) {
--    mp_msg(MSGT_INPUT,MSGL_ERR,"Lirc error :(\n");
--    return MP_INPUT_DEAD;
--  }
--
--  if(!code) return MP_INPUT_NOTHING;
--
--  // We put all cmds in a single buffer separated by \n
--  while((r = lirc_code2char(lirc_config,code,&c))==0 && c!=NULL) {
--    int l = strlen(c);
--    if(l <= 0)
--      continue;
--    cmd_buf = realloc(cmd_buf,cl+l+2);
--    memcpy(&cmd_buf[cl],c,l);
--    cl += l+1;
--    cmd_buf[cl-1] = '\n';
--    cmd_buf[cl] = '\0';
--  }
--
--  free(code);
--
--  if(r < 0)
--    return MP_INPUT_DEAD;
--  else if(cmd_buf) // return the first command in the buffer
--    return mp_input_lirc_read(fd,dest,s);
-+int mp_input_lirc_read(int fd, char* dest, int s)
-+{
-+  if(functions!=NULL && functions->read!=NULL)
-+    return (*functions->read)(fd, dest, s);
-   else
--    return MP_INPUT_RETRY;
--
-+    return MP_INPUT_DEAD;
- }
- 
--void
--mp_input_lirc_close(int fd) {
--  if(cmd_buf) {
--    free(cmd_buf);
--    cmd_buf = NULL;
-+void mp_input_lirc_close(int fd) {
-+  if(functions!=NULL && functions->close!=NULL)
-+  {
-+    (*functions->close)(fd);
-+    if(lirc_handle!=NULL)
-+      dlclose(lirc_handle);
-+    lirc_handle=NULL;
-+    functions=NULL;
-   }
--  lirc_freeconfig(lirc_config);
--  lirc_deinit();
- }
-diff -Nur MPlayer-1.0rc1.old/input/lirc.h MPlayer-1.0rc1.new/input/lirc.h
---- MPlayer-1.0rc1.old/input/lirc.h	2006-10-23 00:32:25.000000000 +0200
-+++ MPlayer-1.0rc1.new/input/lirc.h	2006-10-26 00:40:20.000000000 +0200
-@@ -1,6 +1,6 @@
- 
- 
--int 
-+int
- mp_input_lirc_init(void);
- 
- int
Index: extra/multimedia/mplayer/mplayer.install
diff -u extra/multimedia/mplayer/mplayer.install:1.1 extra/multimedia/mplayer/mplayer.install:removed
--- extra/multimedia/mplayer/mplayer.install:1.1	Sat Oct 28 18:51:42 2006
+++ extra/multimedia/mplayer/mplayer.install	Sun Sep 16 13:01:01 2007
@@ -1,11 +0,0 @@
-post_install() {
-  echo "==> mplayer now has optional lirc support, install lirc if you want to use it"
-}
-
-post_upgrade() {
-  post_install
-}
-
-op=$1
-shift
-$op $*




More information about the arch-commits mailing list