mplayer update effort

View: New views
7 Messages — Rating Filter:   Alert me  

mplayer update effort

by Edd Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Our in tree version of MPlayer is ancient. I noticed this when trying
smplayer last week and it told me so. I CC'd the maintainer of mplayer
in and I have not heard anything, so I attempted to take an update on
myself.

I was hoping someone could help me out here, as I am getting assembler
errors, which I do not have enough knowledge to debug. It seems I
only get these when using external versions of various libraries, as
bulding mplayer standalone works fine (I built one in /opt).

Does anyone know how to start debugging this:

cc -Wundef -Wdisabled-optimization -std=gnu99 -O2 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I. -I/usr/local/include -D_THREAD_SAFE -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/ include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -I/usr/X11R6/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/X11R6/include/pixman-1 -I/usr/local/include -I/usr/local/include/libpng -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/freetype2   -c -o liba52/resample.o liba52/resample.c
{standard input}: Assembler messages:
{standard input}:884: Error: junk `C magicF2W' after expression
{standard input}:885: Error: junk `C wm1100' after expression
{standard input}:886: Error: junk `C wm0101' after expression
{standard input}:887: Error: junk `C wm1010' after expression
{standard input}:931: Error: junk `C magicF2W' after expression
{standard input}:971: Error: junk `C magicF2W' after expression
{standard input}:1034: Error: junk `C magicF2W' after expression
{standard input}:1095: Error: junk `C magicF2W' after expression
{standard input}:1163: Error: junk `C magicF2W' after expression
{standard input}:1214: Error: junk `C magicF2W' after expression
{standard input}:1261: Error: junk `C magicF2W' after expression
{standard input}:1310: Error: junk `C magicF2W' after expression
{standard input}:1364: Error: junk `C magicF2W' after expression
gmake: *** [liba52/resample.o] Error 1
*** Error code 2

I am attaching what I have. It would be great if someone
could kinda "team up" with me to try and roll out a newer mplayer
version.

The attached diff is *far* from finished. For a start the sndio stuff
needs to be fitted properly. I have not gotten round to that yet
and the man page needs tweaking etc. etc.

Thanks

--

Best Regards

Edd Barrett
(Freelance software developer / technical writer / open-source developer)

http://students.dec.bmth.ac.uk/ebarrett

diff -urNa mplayer/Makefile mplayer.new/Makefile
--- mplayer/Makefile Thu Jul  9 16:12:47 2009
+++ mplayer.new/Makefile Thu Jul  9 16:13:26 2009
@@ -5,14 +5,16 @@
 
 COMMENT= movie player supporting MPEG, DivX, AVI, ASF, MOV & more
 
-V= 1.0rc2
+V= 20090708
 N= mplayer
-DISTNAME= MPlayer-${V}
-DIST_SUBDIR= ${N}
-PKGNAME= ${N}-${V}p24
+DISTNAME= mplayer-export-snapshot-${V}
+#DIST_SUBDIR= mplayer-export-2009-07-08
+PKGNAME= ${N}-${V}
 CATEGORIES= x11 multimedia
 EXTRACT_SUFX= .tar.bz2
 
+WRKDIST = ${WRKDIR}/mplayer-export-2009-07-08
+
 HOMEPAGE= http://www.mplayerhq.hu/
 
 # GPL
@@ -22,19 +24,19 @@
 PERMIT_DISTFILES_FTP= Yes
 WANTLIB= c m ncurses pthread stdc++ util sndio z
 
-MASTER_SITES= http://www1.mplayerhq.hu/MPlayer/releases/ \
- http://www2.mplayerhq.hu/MPlayer/releases/ \
- http://www.mplayerhq.hu/MPlayer/releases/ \
- http://ftp.lug.udel.edu/MPlayer/releases/
-
+# XXX will need to host myself
+MASTER_SITES = http://students.dec.bmth.ac.uk/ebarrett/distfiles/
+
 # The skins tarball changes on a daily basis so it is mirrored
 # locally, do NOT change this.
+# XXX is this still so? The infrastructure at their end changed.
 #MASTER_SITES0= http://www2.mplayerhq.hu/MPlayer/Skin/
-MASTER_SITES0= ${MASTER_SITE_BACKUP}
+MASTER_SITES0 = http://www.mplayerhq.hu/MPlayer/skins/
+#MASTER_SITES0= ${MASTER_SITE_BACKUP}
 
 MAINTAINER=     Bjorn Sandell <biorn@...>
 
-SKIN= default
+SKIN= Blue
 SKINVER= 1.7
 DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${SKIN}-${SKINVER}${EXTRACT_SUFX}:0
 
@@ -69,22 +71,15 @@
  --disable-nas \
  --disable-liblzo \
  --disable-caca \
- --disable-vidix-internal \
- --disable-vidix-external \
  --enable-libdv \
  --disable-smb \
- --disable-tremor-external \
- --enable-tremor-internal \
  --disable-faac \
  --disable-select \
  --enable-theora \
  --enable-menu \
  --enable-iconv \
  --enable-cdparanoia \
- --enable-x264 \
  --enable-tv-v4l2 \
- --with-extraincdir=${LOCALBASE}/include/libpng:${LOCALBASE}/include \
- --with-extralibdir=${LOCALBASE}/lib \
  --extra-libs-mplayer="$$(pkg-config --libs x264)" \
  --extra-libs-mencoder="$$(pkg-config --libs x264)" \
  --confdir=${CONFDIR} \
@@ -92,10 +87,11 @@
  --disable-langinfo \
  --disable-fribidi \
  --disable-openal \
- --disable-faad-internal \
- --enable-faad-external \
  --disable-libvorbis \
- --disable-libcdio
+ --disable-libcdio \
+ --extra-cflags=-I${LOCALBASE}/include \
+ --extra-ldflags=-L${LOCALBASE}/lib \
+ --enable-x264
 
 CONFIGURE_ENV+= TMPDIR="${WRKBUILD}"
 
diff -urNa mplayer/distinfo mplayer.new/distinfo
--- mplayer/distinfo Wed Jul  8 20:14:05 2009
+++ mplayer.new/distinfo Wed Jul  8 19:15:06 2009
@@ -1,10 +1,10 @@
-MD5 (mplayer/MPlayer-1.0rc2.tar.bz2) = fiflNcLSZ2N980iY8bkXBw==
-MD5 (mplayer/default-1.7.tar.bz2) = fh0WwvijJGn0NUywQ+7MXQ==
-RMD160 (mplayer/MPlayer-1.0rc2.tar.bz2) = O1y6FSmFahd6UZHiL43MALWoPFI=
-RMD160 (mplayer/default-1.7.tar.bz2) = X3j/nbKW2P1T72YD7IoifutgLdE=
-SHA1 (mplayer/MPlayer-1.0rc2.tar.bz2) = 6bSW81J8VSAE7G0B1rQ/GWtDzi0=
-SHA1 (mplayer/default-1.7.tar.bz2) = aRLD5YtMdvrZf9tylFsngVBp9+M=
-SHA256 (mplayer/MPlayer-1.0rc2.tar.bz2) = OHW3zIXo59+BwCpjjba0qXDR5mqG2tbr8podGfOPWVM=
-SHA256 (mplayer/default-1.7.tar.bz2) = qZkLpTTMqUwad0dF2eMUiRn3kAOmgz/8x4N3HM3gulM=
-SIZE (mplayer/MPlayer-1.0rc2.tar.bz2) = 9338201
-SIZE (mplayer/default-1.7.tar.bz2) = 173439
+MD5 (Blue-1.7.tar.bz2) = 5OICDRG2garImBA7O6cjxA==
+MD5 (mplayer-export-snapshot-20090708.tar.bz2) = XYBaG3E4g3fdMu6vTNW+4g==
+RMD160 (Blue-1.7.tar.bz2) = H4xTnMrcVO6l5meIObzIrh4W5us=
+RMD160 (mplayer-export-snapshot-20090708.tar.bz2) = KWTgoDLjhsjTs4w9Qkm310WVDh4=
+SHA1 (Blue-1.7.tar.bz2) = ReXuelVBpfHP0meKbJtZEcpHPLk=
+SHA1 (mplayer-export-snapshot-20090708.tar.bz2) = /XGBmgcrR2zj4vYTTMU26N5wk8k=
+SHA256 (Blue-1.7.tar.bz2) = i805pXVcRN93jryjEZySI0er/a2xAdzvARziVmwfsdg=
+SHA256 (mplayer-export-snapshot-20090708.tar.bz2) = CFtDchdvXwXt/4pQo7f6KpWXEIw6ghz5+e4Z//isIVE=
+SIZE (Blue-1.7.tar.bz2) = 222567
+SIZE (mplayer-export-snapshot-20090708.tar.bz2) = 8238626
diff -urNa mplayer/patches/patch-DOCS_man_en_mplayer_1 mplayer.new/patches/patch-DOCS_man_en_mplayer_1
--- mplayer/patches/patch-DOCS_man_en_mplayer_1 Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-DOCS_man_en_mplayer_1 Thu Jan  1 01:00:00 1970
@@ -1,30 +0,0 @@
-$OpenBSD: patch-DOCS_man_en_mplayer_1,v 1.1 2009/02/08 20:25:09 naddy Exp $
---- DOCS/man/en/mplayer.1.orig Sun Feb  8 19:50:39 2009
-+++ DOCS/man/en/mplayer.1 Sun Feb  8 19:51:38 2009
-@@ -1177,7 +1177,7 @@ May be negative.
- .
- .TP
- .B \-cdrom-device <path to device>
--Specify the CD-ROM device (default: /dev/\:cdrom).
-+Specify the CD-ROM device (default: /dev/rcd0c).
- .
- .TP
- .B \-channels <number> (also see \-af channels)
-@@ -1300,7 +1300,7 @@ frequency before giving up (default: 30).
- .
- .TP
- .B \-dvd-device <path to device> (DVD only)
--Specify the DVD device (default: /dev/\:dvd).
-+Specify the DVD device (default: /dev/rcd0c).
- You can also specify a directory that contains files previously copied directly
- from a DVD (with e.g.\& vobcopy).
- Note that using \-dumpstream is usually a better way to
-@@ -10519,7 +10519,7 @@ mplayer dvd://1 \-dvdangle 2
- .PP
- .B Play from a different DVD device:
- .nf
--mplayer dvd://1 \-dvd-device /dev/\:dvd2
-+mplayer dvd://1 \-dvd-device /dev/rcd1c
- .fi
- .
- .PP
diff -urNa mplayer/patches/patch-Makefile mplayer.new/patches/patch-Makefile
--- mplayer/patches/patch-Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-Makefile Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-Makefile,v 1.18 2008/07/09 02:19:36 jakemsr Exp $
---- Makefile.orig Sun Oct  7 12:49:33 2007
-+++ Makefile Sat Jun 28 14:12:25 2008
-@@ -88,7 +88,7 @@ ALL_PRG-$(MPLAYER)  += mplayer$(EXESUF)
- ALL_PRG-$(MENCODER) += mencoder$(EXESUF)
-
- COMMON_LIBS  += $(COMMON_LIBS-yes)
--LIBS_MPLAYER += $(LIBS_MPLAYER-yes)
-+LIBS_MPLAYER += $(LIBS_MPLAYER-yes) -lrtunes -lcrypto
- OBJS_MPLAYER += $(OBJS_MPLAYER-yes)
- PARTS        += $(PARTS-yes)
- ALL_PRG      += $(ALL_PRG-yes)
diff -urNa mplayer/patches/patch-common_mak mplayer.new/patches/patch-common_mak
--- mplayer/patches/patch-common_mak Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-common_mak Thu Jan  1 01:00:00 1970
@@ -1,23 +0,0 @@
-$OpenBSD: patch-common_mak,v 1.2 2008/07/09 02:19:36 jakemsr Exp $
---- common.mak.orig Sun Oct  7 12:49:33 2007
-+++ common.mak Sat Jun 28 14:11:44 2008
-@@ -10,9 +10,17 @@ OBJS     += $(OBJS-yes)
- ASM_OBJS += $(ASM_OBJS-yes)
- CPP_OBJS += $(CPP_OBJS-yes)
-
--CFLAGS += -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-+CFLAGS := -DHAVE_AV_CONFIG_H \
-           -D_ISOC9X_SOURCE -I$(BUILD_ROOT) -I$(SRC_PATH) \
--          -I$(SRC_PATH)/libavutil $(OPTFLAGS)
-+          -I$(SRC_PATH)/libavutil $(CFLAGS)
-+
-+ifeq ($(ARCH_X86),yes)
-+CFLAGS += -fomit-frame-pointer
-+endif
-+
-+#CFLAGS := $(subst -O3,-O,$(CFLAGS))
-+#CFLAGS := $(subst -O2,-O,$(CFLAGS))
-+#CFLAGS := $(subst -O1,-O,$(CFLAGS))
-
- SRCS := $(OBJS:.o=.c) $(ASM_OBJS:.o=.S) $(CPPOBJS:.o=.cpp)
- OBJS := $(OBJS) $(ASM_OBJS) $(CPPOBJS)
diff -urNa mplayer/patches/patch-configure mplayer.new/patches/patch-configure
--- mplayer/patches/patch-configure Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-configure Wed Jul  8 19:23:17 2009
@@ -1,195 +1,16 @@
-$OpenBSD: patch-configure,v 1.51 2009/05/05 11:40:08 sthen Exp $
---- configure.orig Sun Oct  7 22:49:33 2007
-+++ configure Sun Apr 19 13:55:04 2009
-@@ -76,7 +76,7 @@ cc_check() {
- }
-
- cxx_check() {
--  compile_check $TMPCPP $@ -lstdc++
-+  compile_check $TMPCPP $@ -lstdc++ -lm
- }
-
- tmp_run() {
-@@ -397,6 +397,7 @@ Audio output:
-   --disable-nas          disable NAS audio output [autodetect]
-   --disable-sgiaudio     disable SGI audio output [autodetect]
-   --disable-sunaudio     disable Sun audio output [autodetect]
-+  --disable-libsndio     disable libsndio audio output [autodetect]
-   --disable-win32waveout disable Windows waveout audio output [autodetect]
-   --disable-select       disable using select() on the audio device [enable]
-
-@@ -501,7 +502,7 @@ _libavcodec_a=auto
- _libamr_nb=auto
- _libamr_wb=auto
- _libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
--_libavdecoders=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER//  -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// `
-+_libavdecoders=` echo $_libavdecoders_all | sed -e s/LIBFAAD_DECODER// -e s/MPEG4AAC_DECODER//  -e s/LIBA52_DECODER// -e s/LIBGSM_DECODER// -e s/LIBGSM_MS_DECODER// -e s/LIBVORBIS_DECODER// -e s/VORBIS_DECODER// `
- _libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
- _libavencoders=` echo $_libavencoders_all | sed -e s/LIBGSM_ENCODER// -e s/LIBGSM_MS_ENCODER// -e s/LIBTHEORA_ENCODER// `
- _libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
-@@ -598,6 +599,7 @@ _xf86keysym=auto
- _mlib=no #broken, thus disabled
- _sgiaudio=auto
- _sunaudio=auto
-+_libsndio=auto
- _alsa=auto
- _fastmemcpy=yes
- _unrarlib=yes
-@@ -963,6 +965,8 @@ for ac_option do
-   --disable-mlib) _mlib=no ;;
-   --enable-sunaudio) _sunaudio=yes ;;
-   --disable-sunaudio) _sunaudio=no ;;
-+  --enable-libsndio) _libsndio=yes ;;
-+  --disable-libsndio) _libsndio=no ;;
-   --enable-sgiaudio) _sgiaudio=yes ;;
-   --disable-sgiaudio) _sgiaudio=no ;;
-   --enable-alsa) _alsa=yes ;;
-@@ -1557,6 +1561,8 @@ if x86 ; then
-   pparam=`echo $exts | sed -e s/k6_mtrr/mtrr/ -e s/cyrix_arr/mtrr/ -e s/centaur_mcr/mtrr/ \
-                            -e s/xmm/sse/ -e s/kni/sse/`
-
-+  if x86_64 ; then pparam="3dnow 3dnowext mmx mmxext xmm sse sse2" ; fi
-+
-   for ext in $pparam ; do
-     eval test \"\$_$ext\" = auto 2>/dev/null && eval _$ext=kernel_check
-   done
-@@ -2323,7 +2329,7 @@ fi # if darwin && test "$cc_vendor" = "gnu" ; then
- # Checking for CFLAGS
- _install_strip="-s"
- if test "$_profile" != "" || test "$_debug" != "" ; then
--  CFLAGS="-W -Wall -O2 $_march $_mcpu $_pipe $_debug $_profile"
-+  CFLAGS="-W -Wall -O1 $_march $_mcpu $_pipe $_debug $_profile"
-   _install_strip=
- elif test -z "$CFLAGS" ; then
-   if test "$cc_vendor" = "intel" ; then
-@@ -3065,7 +3071,7 @@ int main(void) { pthread_t tid; return pthread_create
+$OpenBSD$
+--- configure.orig Wed Jul  8 19:21:27 2009
++++ configure Wed Jul  8 19:23:12 2009
+@@ -2374,7 +2374,11 @@ cat > $TMPC << EOF
+ int ff_extern;
  EOF
- _pthreads=no
- if not hpux ; then
--  for _ld_tmp in "-lpthreadGC2" "" "-lpthread" "-pthread" ; do
-+  for _ld_tmp in "-lpthreadGC2" "" "-pthread" "-lpthread" ; do
-     # for crosscompilation, we cannot execute the program, be happy if we can link statically
-     cc_check $_ld_tmp && (tmp_run || test "$_ld_static") && _ld_pthread="$_ld_tmp" && _pthreads=yes && break
-   done
-@@ -3108,7 +3114,7 @@ fi
- echores "$_rpath"
-
- echocheck "iconv"
--if test "$_iconv" = auto ; then
-+if test "$_iconv" != no ; then
-   cat > $TMPC << EOF
- #include <stdio.h>
- #include <unistd.h>
-@@ -4369,6 +4375,8 @@ if test "$_aa" = yes ; then
-   _def_aa='#define HAVE_AA 1'
-   if cygwin ; then
-     _libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
-+  else
-+    _libs_mplayer="$_libs_mplayer -laa"
-   fi
-   _vosrc="$_vosrc vo_aa.c"
-   _vomodules="aa $_vomodules"
-@@ -4576,7 +4584,7 @@ fi
- echores "$_png"
- if test "$_png" = yes ; then
-   _def_png='#define HAVE_PNG 1'
--  _ld_extra="$_ld_extra -lpng -lz"
-+  _ld_extra="$_ld_extra -lpng -lz $_ld_lm"
-   _vosrc="$_vosrc vo_png.c"
-   _vomodules="png $_vomodules"
- else
-@@ -5129,7 +5137,8 @@ fi
- echocheck "JACK"
- if test "$_jack" = auto ; then
-   _jack=yes
--
-+fi
-+if test "$_jack" = yes ; then
- cat > $TMPC << EOF
- #include <jack/jack.h>
- int main(void) { jack_client_new("test"); return 0; }
-@@ -5303,6 +5312,27 @@ fi
- echores "$_sunaudio"
-
-
-+echocheck "libsndio audio"
-+if test "$_libsndio" = auto ; then
-+  cat > $TMPC << EOF
-+#include <sndio.h>
-+int main(void) { struct sio_par par; sio_initpar(&par); return 0; }
-+EOF
-+  _libsndio=no
-+  cc_check -lsndio && _libsndio=yes
-+fi
-+if test "$_libsndio" = yes ; then
-+  _def_libsndio='#define USE_LIBSNDIO_AUDIO 1'
-+  _aosrc="$_aosrc ao_libsndio.c"
-+  _aomodules="libsndio $_aomodules"
-+  _libs_mplayer="$_libs_mplayer -lsndio"
-+else
-+  _def_libsndio='#undef USE_LIBSNDIO_AUDIO'
-+  _noaomodules="libsndio $_noaomodules"
-+fi
-+echores "$_libsndio"
+ cc_check -c || die "Symbol mangling check failed."
+-sym=$($_nm -P -g $TMPEXE)
 +
++# OpenBSD nm does not understand -P (posix mode on linux)
++# sym=$($_nm -P -g $TMPEXE) */
++sym=$($_nm -g $TMPEXE)
 +
- if sunos; then
- echocheck "Sun mediaLib"
- if test "$_mlib" = auto ; then
-@@ -5343,7 +5373,7 @@ fi #if irix
-
-
- echocheck "VCD support"
--if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32; then
-+if linux || bsdos || freebsd || netbsd || sunos || darwin || mingw32 || openbsd ; then
-   _inputmodules="vcd $_inputmodules"
-   _def_vcd='#define HAVE_VCD 1'
-   _vcd="yes"
-@@ -5592,7 +5622,7 @@ int main()
- }
- EOF
-   _fontconfig=no
--  for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz" ; do
-+  for _ld_tmp in "" "-lexpat -lfreetype" "-lexpat -lfreetype -lz $_ld_lm" ; do
-     _ld_tmp="-lfontconfig $_ld_tmp"
-     cc_check $_ld_tmp && _fontconfig=yes && _ld_extra="$_ld_extra $_ld_tmp" && break
-   done
-@@ -5704,10 +5734,10 @@ cat > $TMPC << EOF
- int main(void) { (void) inflate(0, Z_NO_FLUSH); return 0; }
- EOF
- _zlib=no
--cc_check -lz && _zlib=yes
-+cc_check "-lz $_ld_lm" && _zlib=yes
- if test "$_zlib" = yes ; then
-   _def_zlib='#define HAVE_ZLIB 1'
--  _ld_extra="$_ld_extra -lz"
-+  _ld_extra="$_ld_extra -lz $_ld_lm"
- else
-   _def_zlib='#undef HAVE_ZLIB'
-   _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
-@@ -6207,7 +6237,7 @@ if test "$_real" = auto ; then
-   _real=no
-   _res_comment="dynamic loader support needed"
-   if test "$_dl" = yes || test "$_win32dll" = yes &&
--     (linux || freebsd || netbsd || win32 || darwin) ; then
-+     (linux || freebsd || netbsd || openbsd || win32 || darwin) ; then
-     _real=yes
-   fi
- fi
-@@ -8151,6 +8181,7 @@ $_def_openal_h
- $_def_sys_asoundlib_h
- $_def_alsa_asoundlib_h
- $_def_sunaudio
-+$_def_libsndio
- $_def_sgiaudio
- $_def_win32waveout
- $_def_nas
-@@ -8240,7 +8271,7 @@ $_def_vcd
- #define DEFAULT_CDROM_DEVICE    "/dev/disk1"
- #define DEFAULT_DVD_DEVICE "/dev/rdiskN"
- #elif defined(__OpenBSD__)
--#define DEFAULT_CDROM_DEVICE "/dev/rcd0a"
-+#define DEFAULT_CDROM_DEVICE "/dev/rcd0c"
- #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE
- #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
- #define DEFAULT_CDROM_DEVICE "/dev/acd0"
+ extern_prefix=${sym%%ff_extern*}
+ def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
+ echores $extern_prefix
diff -urNa mplayer/patches/patch-configure.orig mplayer.new/patches/patch-configure.orig
--- mplayer/patches/patch-configure.orig Thu Jan  1 01:00:00 1970
+++ mplayer.new/patches/patch-configure.orig Wed Jul  8 19:22:43 2009
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- configure.orig Wed Jul  8 19:21:27 2009
++++ configure Wed Jul  8 19:22:35 2009
+@@ -2374,7 +2374,11 @@ cat > $TMPC << EOF
+ int ff_extern;
+ EOF
+ cc_check -c || die "Symbol mangling check failed."
+-sym=$($_nm -P -g $TMPEXE)
++
++/* OpenBSD nm does not understand -P (posix mode on linux) */
++/* sym=$($_nm -P -g $TMPEXE) */
++sym=$($_nm -g $TMPEXE)
++
+ extern_prefix=${sym%%ff_extern*}
+ def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
+ echores $extern_prefix
diff -urNa mplayer/patches/patch-configure~ mplayer.new/patches/patch-configure~
--- mplayer/patches/patch-configure~ Thu Jan  1 01:00:00 1970
+++ mplayer.new/patches/patch-configure~ Wed Jul  8 19:23:14 2009
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- configure.orig Wed Jul  8 19:21:27 2009
++++ configure Wed Jul  8 19:23:12 2009
+@@ -2374,7 +2374,11 @@ cat > $TMPC << EOF
+ int ff_extern;
+ EOF
+ cc_check -c || die "Symbol mangling check failed."
+-sym=$($_nm -P -g $TMPEXE)
++
++# OpenBSD nm does not understand -P (posix mode on linux)
++# sym=$($_nm -P -g $TMPEXE) */
++sym=$($_nm -g $TMPEXE)
++
+ extern_prefix=${sym%%ff_extern*}
+ def_extern_prefix="#define EXTERN_PREFIX \"$extern_prefix\""
+ echores $extern_prefix
diff -urNa mplayer/patches/patch-dvdread_Makefile mplayer.new/patches/patch-dvdread_Makefile
--- mplayer/patches/patch-dvdread_Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-dvdread_Makefile Thu Jan  1 01:00:00 1970
@@ -1,14 +0,0 @@
-$OpenBSD: patch-dvdread_Makefile,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
---- dvdread/Makefile.orig Mon Jan 21 15:04:18 2008
-+++ dvdread/Makefile Mon Jan 21 15:04:41 2008
-@@ -12,8 +12,8 @@ SRCS_COMMON = cmd_print.c \
-               nav_print.c \
-               nav_read.c \
-
--CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE
--
- CFLAGS-$(DVDCSS_INTERNAL) += -I../libdvdcss -DHAVE_DVDCSS_DVDCSS_H
-
- include ../mpcommon.mak
-+
-+CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE
diff -urNa mplayer/patches/patch-libao2_Makefile mplayer.new/patches/patch-libao2_Makefile
--- mplayer/patches/patch-libao2_Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libao2_Makefile Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-libao2_Makefile,v 1.1 2008/02/12 11:33:16 jakemsr Exp $
---- libao2/Makefile.orig Sun Oct  7 12:49:27 2007
-+++ libao2/Makefile Sun Feb 10 17:05:17 2008
-@@ -6,6 +6,7 @@ SRCS_MPLAYER = audio_out.c \
-                ao_mpegpes.c \
-                ao_null.c \
-                ao_pcm.c \
-+               ao_rtunes.c \
-                $(AO_SRCS) \
-
- include ../mpcommon.mak
diff -urNa mplayer/patches/patch-libao2_ao_sun_c mplayer.new/patches/patch-libao2_ao_sun_c
--- mplayer/patches/patch-libao2_ao_sun_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libao2_ao_sun_c Thu Jan  1 01:00:00 1970
@@ -1,139 +0,0 @@
-$OpenBSD: patch-libao2_ao_sun_c,v 1.4 2008/02/08 17:32:41 jakemsr Exp $
---- libao2/ao_sun.c.orig Sun Oct  7 12:49:27 2007
-+++ libao2/ao_sun.c Mon Feb  4 05:07:06 2008
-@@ -102,6 +102,7 @@ static int af2sunfmt(int format)
- // sample counter information
- static int realtime_samplecounter_available(char *dev)
- {
-+#ifdef __svr4__
-     int fd = -1;
-     audio_info_t info;
-     int rtsc_ok = RTSC_DISABLED;
-@@ -217,6 +218,9 @@ error:
-     }
-
-     return rtsc_ok;
-+#else
-+    return RTSC_DISABLED;
-+#endif
- }
-
-
-@@ -440,7 +444,7 @@ static int control(int cmd,void *arg){
- else
-    info.play.balance = (vol->right - vol->left + volume) * AUDIO_RIGHT_BALANCE / (2*volume);
-    }
--#if !defined (__OpenBSD__) && !defined (__NetBSD__)
-+#if !defined (__NetBSD__)
-    info.output_muted = (volume == 0);
- #endif
-    ioctl( fd,AUDIO_SETINFO,&info );
-@@ -566,11 +570,20 @@ static int init(int rate,int channels,int format,int f
-     ao_data.bps = byte_per_sec = bytes_per_sample * ao_data.samplerate;
-     ao_data.outburst = byte_per_sec > 100000 ? 16384 : 8192;
-
-+#if defined(__OpenBSD__) || defined(__NetBSD__)
-     AUDIO_INITINFO(&info);
-+    info.blocksize = ao_data.outburst;
-+    ioctl (audio_fd, AUDIO_SETINFO, &info);
-+#endif
-+#ifdef __svr4__
-+    AUDIO_INITINFO(&info);
-     info.play.samples = 0;
-     info.play.eof = 0;
-     info.play.error = 0;
-     ioctl (audio_fd, AUDIO_SETINFO, &info);
-+#else
-+    ioctl (audio_fd, AUDIO_FLUSH);
-+#endif
-
-     queued_bursts = 0;
-     queued_samples = 0;
-@@ -607,9 +620,11 @@ static void reset(void){
- : AUDIO_PRECISION_8);
-     info.play.channels = ao_data.channels;
-     info.play.sample_rate = ao_data.samplerate;
-+#ifdef __svr4__
-     info.play.samples = 0;
-     info.play.eof = 0;
-     info.play.error = 0;
-+#endif
-     ioctl (audio_fd, AUDIO_SETINFO, &info);
-     queued_bursts = 0;
-     queued_samples = 0;
-@@ -636,7 +651,11 @@ static void audio_resume(void)
-
- // return: how many bytes can be played without blocking
- static int get_space(void){
-+#if defined(__OpenBSD__)
-+    audio_bufinfo_t ab;
-+#else
-     audio_info_t info;
-+#endif
-
-     // check buffer
- #ifdef HAVE_AUDIO_SELECT
-@@ -651,14 +670,22 @@ static int get_space(void){
-     }
- #endif
-
-+#if defined(__OpenBSD__)
-+    ioctl(audio_fd, AUDIO_GETPRINFO, &ab);
-+    if (ab.hiwat * ab.blksize - ab.seek < ao_data.outburst)
-+ return 0;
-+    else
-+ return ao_data.outburst;
-+#else
-     ioctl(audio_fd, AUDIO_GETINFO, &info);
--#if !defined (__OpenBSD__) && !defined(__NetBSD__)
-+#if !defined(__NetBSD__)
-     if (queued_bursts - info.play.eof > 2)
- return 0;
-     return ao_data.outburst;
- #else
-     return info.hiwat * info.blocksize - info.play.seek;
- #endif
-+#endif  // __OpenBSD__
-
- }
-
-@@ -666,6 +693,16 @@ static int get_space(void){
- // it should round it down to outburst*n
- // return: number of bytes played
- static int play(void* data,int len,int flags){
-+#ifdef __OpenBSD__
-+    if(len==0)
-+        return len;
-+    if(len>ao_data.outburst || !(flags & AOPLAY_FINAL_CHUNK)) {
-+        len/=ao_data.outburst;
-+        len*=ao_data.outburst;
-+    }
-+    len=write(audio_fd,data,len);
-+    return len;
-+#else
-     if (len < ao_data.outburst) return 0;
-     len /= ao_data.outburst;
-     len *= ao_data.outburst;
-@@ -679,16 +716,19 @@ static int play(void* data,int len,int flags){
-    queued_bursts ++;
-     }
-     return len;
-+#endif
- }
-
-
- // return: delay in seconds between first and last sample in buffer
- static float get_delay(void){
--    audio_info_t info;
--    ioctl(audio_fd, AUDIO_GETINFO, &info);
- #if defined (__OpenBSD__) || defined(__NetBSD__)
--    return (float) info.play.seek/ (float)byte_per_sec ;
-+    u_long bytes;
-+    ioctl(audio_fd, AUDIO_WSEEK, &bytes);
-+    return (float) bytes/ (float)byte_per_sec ;
- #else
-+    audio_info_t info;
-+    ioctl(audio_fd, AUDIO_GETINFO, &info);
-     if (info.play.samples && enable_sample_timing == RTSC_ENABLED)
- return (float)(queued_samples - info.play.samples) / (float)ao_data.samplerate;
-     else
diff -urNa mplayer/patches/patch-libao2_audio_out_c mplayer.new/patches/patch-libao2_audio_out_c
--- mplayer/patches/patch-libao2_audio_out_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libao2_audio_out_c Thu Jan  1 01:00:00 1970
@@ -1,38 +0,0 @@
---- libao2/audio_out.c.orig Sun Oct  7 21:49:27 2007
-+++ libao2/audio_out.c Tue Oct 14 11:48:58 2008
-@@ -53,6 +53,9 @@ extern ao_functions_t audio_out_sdl;
- #ifdef USE_SUN_AUDIO
- extern ao_functions_t audio_out_sun;
- #endif
-+#ifdef USE_LIBSNDIO_AUDIO
-+extern ao_functions_t audio_out_libsndio;
-+#endif
- #ifdef USE_SGI_AUDIO
- extern ao_functions_t audio_out_sgi;
- #endif
-@@ -74,6 +77,7 @@ extern ao_functions_t audio_out_v4l2;
- extern ao_functions_t audio_out_mpegpes;
- extern ao_functions_t audio_out_pcm;
- extern ao_functions_t audio_out_pss;
-+extern ao_functions_t audio_out_rtunes;
-
- ao_functions_t* audio_out_drivers[] =
- {
-@@ -102,6 +106,9 @@ ao_functions_t* audio_out_drivers[] =
- #ifdef USE_SGI_AUDIO
-         &audio_out_sgi,
- #endif
-+#ifdef USE_LIBSNDIO_AUDIO
-+        &audio_out_libsndio,
-+#endif
- #ifdef USE_SUN_AUDIO
-         &audio_out_sun,
- #endif
-@@ -140,6 +147,7 @@ ao_functions_t* audio_out_drivers[] =
-         &audio_out_null,
- // should not be auto-selected:
- &audio_out_pcm,
-+ &audio_out_rtunes,
- NULL
- };
-
diff -urNa mplayer/patches/patch-libavcodec_Makefile mplayer.new/patches/patch-libavcodec_Makefile
--- mplayer/patches/patch-libavcodec_Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavcodec_Makefile Thu Jan  1 01:00:00 1970
@@ -1,13 +0,0 @@
-$OpenBSD: patch-libavcodec_Makefile,v 1.7 2008/02/08 17:32:41 jakemsr Exp $
---- libavcodec/Makefile.orig Sun Oct  7 12:49:37 2007
-+++ libavcodec/Makefile Mon Jan 21 14:07:36 2008
-@@ -420,6 +420,9 @@ ALTIVEC-OBJS-$(CONFIG_WMV3_DECODER)    += ppc/vc1dsp_a
- # -maltivec is needed in order to build AltiVec code.
- $(ALTIVEC-OBJS-yes): CFLAGS += -maltivec -mabi=altivec
-
-+# compiler optimizations cause problems
-+ppc/mpegvideo_altivec.o: CFLAGS += -O
-+
- # check_altivec must be built without -maltivec
- OBJS-$(HAVE_ALTIVEC)                   += $(ALTIVEC-OBJS-yes)       \
-                                           ppc/check_altivec.o
diff -urNa mplayer/patches/patch-libavcodec_dsputil_c mplayer.new/patches/patch-libavcodec_dsputil_c
--- mplayer/patches/patch-libavcodec_dsputil_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavcodec_dsputil_c Thu Jan  1 01:00:00 1970
@@ -1,22 +0,0 @@
-$OpenBSD: patch-libavcodec_dsputil_c,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
---- libavcodec/dsputil.c.orig Sun Oct  7 12:49:37 2007
-+++ libavcodec/dsputil.c Mon Feb  4 16:24:38 2008
-@@ -39,7 +39,9 @@
- void ff_spatial_dwt(int *buffer, int width, int height, int stride, int type, int decomposition_count);
-
- /* vorbis.c */
-+#if ENABLE_VORBIS_DECODER
- void vorbis_inverse_coupling(float *mag, float *ang, int blocksize);
-+#endif
-
- /* flacenc.c */
- void ff_flac_compute_autocorr(const int32_t *data, int len, int lag, double *autoc);
-@@ -3850,7 +3852,7 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx
- {
-     int i;
-
--    ff_check_alignment();
-+    /*ff_check_alignment();*/
-
- #ifdef CONFIG_ENCODERS
-     if(avctx->dct_algo==FF_DCT_FASTINT) {
diff -urNa mplayer/patches/patch-libavcodec_h264_c mplayer.new/patches/patch-libavcodec_h264_c
--- mplayer/patches/patch-libavcodec_h264_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavcodec_h264_c Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libavcodec_h264_c,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
---- libavcodec/h264.c.orig Mon Jan 21 13:58:41 2008
-+++ libavcodec/h264.c Mon Jan 21 14:00:06 2008
-@@ -5241,7 +5241,7 @@ static inline int get_cabac_cbf_ctx( H264Context *h, i
-     return ctx + 4 * cat;
- }
-
--static const attribute_used uint8_t last_coeff_flag_offset_8x8[63] = {
-+const attribute_used uint8_t last_coeff_flag_offset_8x8[63] = {
-     0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-     2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-     3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,
diff -urNa mplayer/patches/patch-libavcodec_libx264_c mplayer.new/patches/patch-libavcodec_libx264_c
--- mplayer/patches/patch-libavcodec_libx264_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavcodec_libx264_c Thu Jan  1 01:00:00 1970
@@ -1,29 +0,0 @@
-$OpenBSD: patch-libavcodec_libx264_c,v 1.1 2009/04/14 19:52:08 kili Exp $
---- libavcodec/libx264.c.orig Sun Jan  4 00:43:21 2009
-+++ libavcodec/libx264.c Sun Jan  4 00:44:24 2009
-@@ -162,7 +162,7 @@ X264_init(AVCodecContext *avctx)
-
-     x4->params.i_bframe = avctx->max_b_frames;
-     x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
--    x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
-+    x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
-     x4->params.i_bframe_bias = avctx->bframebias;
-     x4->params.b_bframe_pyramid = (avctx->flags2 & CODEC_FLAG2_BPYRAMID);
-     avctx->has_b_frames= (avctx->flags2 & CODEC_FLAG2_BPYRAMID) ? 2 : !!avctx->max_b_frames;
-@@ -225,8 +225,6 @@ X264_init(AVCodecContext *avctx)
-     x4->params.analyse.i_me_range = avctx->me_range;
-     x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
-
--    x4->params.analyse.b_bidir_me = (avctx->bidir_refine > 0);
--    x4->params.analyse.b_bframe_rdo = (avctx->flags2 & CODEC_FLAG2_BRDO);
-     x4->params.analyse.b_mixed_references =
-         (avctx->flags2 & CODEC_FLAG2_MIXED_REFS);
-     x4->params.analyse.b_chroma_me = (avctx->me_cmp & FF_CMP_CHROMA);
-@@ -251,7 +249,6 @@ X264_init(AVCodecContext *avctx)
-     x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
-     x4->params.rc.f_pb_factor = avctx->b_quant_factor;
-     x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
--    x4->params.rc.psz_rc_eq = avctx->rc_eq;
-
-     x4->params.analyse.b_psnr = (avctx->flags & CODEC_FLAG_PSNR);
-     x4->params.i_log_level = X264_LOG_DEBUG;
diff -urNa mplayer/patches/patch-libavformat_4xm_c mplayer.new/patches/patch-libavformat_4xm_c
--- mplayer/patches/patch-libavformat_4xm_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavformat_4xm_c Thu Jan  1 01:00:00 1970
@@ -1,18 +0,0 @@
-$OpenBSD: patch-libavformat_4xm_c,v 1.1 2009/01/29 17:28:13 sthen Exp $
---- libavformat/4xm.c.orig Thu Jan 29 11:19:43 2009
-+++ libavformat/4xm.c Thu Jan 29 11:20:45 2009
-@@ -163,10 +163,12 @@ static int fourxm_read_header(AVFormatContext *s,
-                 return AVERROR_INVALIDDATA;
-             }
-             current_track = AV_RL32(&header[i + 8]);
-+            if((unsigned)current_track >= UINT_MAX / sizeof(AudioTrack) - 1){
-+                av_log(s, AV_LOG_ERROR, "current_track too large\n");
-+                return -1;
-+            }
-             if (current_track + 1 > fourxm->track_count) {
-                 fourxm->track_count = current_track + 1;
--                if((unsigned)fourxm->track_count >= UINT_MAX / sizeof(AudioTrack))
--                    return -1;
-                 fourxm->tracks = av_realloc(fourxm->tracks,
-                     fourxm->track_count * sizeof(AudioTrack));
-                 if (!fourxm->tracks) {
diff -urNa mplayer/patches/patch-libavutil_x86_cpu_h mplayer.new/patches/patch-libavutil_x86_cpu_h
--- mplayer/patches/patch-libavutil_x86_cpu_h Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libavutil_x86_cpu_h Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libavutil_x86_cpu_h,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
---- libavutil/x86_cpu.h.orig Sat Jan 26 15:11:55 2008
-+++ libavutil/x86_cpu.h Sat Jan 26 15:14:22 2008
-@@ -61,7 +61,7 @@
- #  define HAVE_7REGS 1
- #endif
-
--#if defined(ARCH_X86_64) && defined(PIC)
-+#if defined(ARCH_X86_64)  /* && defined(PIC)) the stuff under this condition just isn't amd64 compatible */  
- #  define BROKEN_RELOCATIONS 1
- #endif
-
diff -urNa mplayer/patches/patch-libdvdcss_Makefile mplayer.new/patches/patch-libdvdcss_Makefile
--- mplayer/patches/patch-libdvdcss_Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libdvdcss_Makefile Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libdvdcss_Makefile,v 1.1 2008/02/08 17:32:41 jakemsr Exp $
---- libdvdcss/Makefile.orig Mon Jan 21 15:05:17 2008
-+++ libdvdcss/Makefile Mon Jan 21 15:05:34 2008
-@@ -9,6 +9,6 @@ SRCS_COMMON = css.c \
-               libdvdcss.c \
-               #bsdi_ioctl \
-
--CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"
--
- include ../mpcommon.mak
-+
-+CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\"
diff -urNa mplayer/patches/patch-libmpcodecs_ad_faad_c mplayer.new/patches/patch-libmpcodecs_ad_faad_c
--- mplayer/patches/patch-libmpcodecs_ad_faad_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpcodecs_ad_faad_c Thu Jan  1 01:00:00 1970
@@ -1,30 +0,0 @@
-$OpenBSD: patch-libmpcodecs_ad_faad_c,v 1.2 2008/09/15 22:13:02 jakemsr Exp $
---- libmpcodecs/ad_faad.c.orig Sun Oct  7 12:49:25 2007
-+++ libmpcodecs/ad_faad.c Wed Jul 16 01:50:40 2008
-@@ -66,7 +66,7 @@ static int aac_probe(unsigned char *buffer, int len)
-
- static int init(sh_audio_t *sh)
- {
--  unsigned long faac_samplerate;
-+  unsigned int faac_samplerate;
-   unsigned char faac_channels;
-   int faac_init, pos = 0;
-   faac_hdec = faacDecOpen();
-@@ -148,7 +148,7 @@ static int init(sh_audio_t *sh)
-     return 0;
-   } else {
-     mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Decoder init done (%dBytes)!\n", sh->a_in_buffer_len); // XXX: remove or move to debug!
--    mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %ldHz  channels: %d\n", faac_samplerate, faac_channels);
-+    mp_msg(MSGT_DECAUDIO,MSGL_V,"FAAD: Negotiated samplerate: %dHz  channels: %d\n", faac_samplerate, faac_channels);
-     sh->channels = faac_channels;
-     if (audio_output_channels <= 2) sh->channels = faac_channels > 1 ? 2 : 1;
-     sh->samplerate = faac_samplerate;
-@@ -276,7 +276,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *
-     } else {
-       /* XXX: samples already multiplied by channels! */
-       mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: Successfully decoded frame (%ld Bytes)!\n",
--      sh->samplesize*faac_finfo.samples);
-+      (long)sh->samplesize*faac_finfo.samples);
-       memcpy(buf+len,faac_sample_buffer, sh->samplesize*faac_finfo.samples);
-       last_dec_len = sh->samplesize*faac_finfo.samples;
-       len += last_dec_len;
diff -urNa mplayer/patches/patch-libmpcodecs_ad_pcm_c mplayer.new/patches/patch-libmpcodecs_ad_pcm_c
--- mplayer/patches/patch-libmpcodecs_ad_pcm_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpcodecs_ad_pcm_c Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libmpcodecs_ad_pcm_c,v 1.3 2006/07/19 21:40:47 robert Exp $
---- libmpcodecs/ad_pcm.c.orig Sun Jun 11 20:35:41 2006
-+++ libmpcodecs/ad_pcm.c Thu Jul  6 00:08:11 2006
-@@ -20,6 +20,8 @@ LIBAD_EXTERN(pcm)
- static int init(sh_audio_t *sh_audio)
- {
-   WAVEFORMATEX *h=sh_audio->wf;
-+  if (!h)
-+    return 0;
-   sh_audio->i_bps=h->nAvgBytesPerSec;
-   sh_audio->channels=h->nChannels;
-   sh_audio->samplerate=h->nSamplesPerSec;
diff -urNa mplayer/patches/patch-libmpdemux_demux_audio_c mplayer.new/patches/patch-libmpdemux_demux_audio_c
--- mplayer/patches/patch-libmpdemux_demux_audio_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpdemux_demux_audio_c Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-libmpdemux_demux_audio_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
---- libmpdemux/demux_audio.c.orig Fri Feb  8 13:28:43 2008
-+++ libmpdemux/demux_audio.c Fri Feb  8 13:29:10 2008
-@@ -229,6 +229,8 @@ get_flac_metadata (demuxer_t* demuxer)
-           ptr += 4;
-
-           comment = ptr;
-+          if (&comment[length] < comments || &comment[length] >= &comments[blk_len])
-+            return;
-           c = comment[length];
-           comment[length] = 0;
-
diff -urNa mplayer/patches/patch-libmpdemux_demux_mov_c mplayer.new/patches/patch-libmpdemux_demux_mov_c
--- mplayer/patches/patch-libmpdemux_demux_mov_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpdemux_demux_mov_c Thu Jan  1 01:00:00 1970
@@ -1,36 +0,0 @@
-$OpenBSD: patch-libmpdemux_demux_mov_c,v 1.3 2008/02/11 00:22:03 jakemsr Exp $
---- libmpdemux/demux_mov.c.orig Fri Feb  8 13:29:41 2008
-+++ libmpdemux/demux_mov.c Fri Feb  8 13:31:59 2008
-@@ -173,11 +173,12 @@ void mov_build_index(mov_track_t* trak,int timescale){
-     i=trak->chunkmap_size;
-     while(i>0){
- --i;
-- for(j=trak->chunkmap[i].first;j<last;j++){
-+ j=FFMAX(trak->chunkmap[i].first, 0);
-+ for(;j<last;j++){
-    trak->chunks[j].desc=trak->chunkmap[i].sdid;
-    trak->chunks[j].size=trak->chunkmap[i].spc;
- }
-- last=trak->chunkmap[i].first;
-+ last=FFMIN(trak->chunkmap[i].first, trak->chunks_size);
-     }
-
- #if 0
-@@ -235,6 +236,8 @@ void mov_build_index(mov_track_t* trak,int timescale){
-     s=0;
-     for(j=0;j<trak->durmap_size;j++){
- for(i=0;i<trak->durmap[j].num;i++){
-+    if (s >= trak->samples_size)
-+ break;
-    trak->samples[s].pts=pts;
-    ++s;
-    pts+=trak->durmap[j].dur;
-@@ -246,6 +249,8 @@ void mov_build_index(mov_track_t* trak,int timescale){
-     for(j=0;j<trak->chunks_size;j++){
- off_t pos=trak->chunks[j].pos;
- for(i=0;i<trak->chunks[j].size;i++){
-+    if (s >= trak->samples_size)
-+ break;
-    trak->samples[s].pos=pos;
-    mp_msg(MSGT_DEMUX, MSGL_DBG3, "Sample %5d: pts=%8d  off=0x%08X  size=%d\n",s,
- trak->samples[s].pts,
diff -urNa mplayer/patches/patch-libmpdemux_demux_real_c mplayer.new/patches/patch-libmpdemux_demux_real_c
--- mplayer/patches/patch-libmpdemux_demux_real_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpdemux_demux_real_c Thu Jan  1 01:00:00 1970
@@ -1,27 +0,0 @@
-$OpenBSD: patch-libmpdemux_demux_real_c,v 1.3 2008/10/01 16:01:51 naddy Exp $
---- libmpdemux/demux_real.c.orig Sun Oct  7 21:49:33 2007
-+++ libmpdemux/demux_real.c Tue Sep 30 16:34:43 2008
-@@ -958,6 +958,7 @@ got_video:
-    // last fragment!
-    if(dp_hdr->len!=vpkg_length-vpkg_offset)
- mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d  frag.len=%d  total.len=%d  \n",dp->len,vpkg_offset,vpkg_length-vpkg_offset);
-+    if (vpkg_offset > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) vpkg_offset = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
-                stream_read(demuxer->stream, dp_data+dp_hdr->len, vpkg_offset);
-    if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
-    dp_hdr->len+=vpkg_offset;
-@@ -981,6 +982,7 @@ got_video:
- // non-last fragment:
- if(dp_hdr->len!=vpkg_offset)
-    mp_msg(MSGT_DEMUX,MSGL_V,"warning! assembled.len=%d  offset=%d  frag.len=%d  total.len=%d  \n",dp->len,vpkg_offset,len,vpkg_length);
-+ if (len > dp->len - sizeof(dp_hdr_t) - dp_hdr->len) len = dp->len - sizeof(dp_hdr_t) - dp_hdr->len;
-             stream_read(demuxer->stream, dp_data+dp_hdr->len, len);
- if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else
- dp_hdr->len+=len;
-@@ -1003,6 +1005,7 @@ got_video:
- extra[0]=1; extra[1]=0; // offset of the first chunk
- if(0x00==(vpkg_header&0xc0)){
-    // first fragment:
-+    if (len > dp->len - sizeof(dp_hdr_t)) len = dp->len - sizeof(dp_hdr_t);
-    dp_hdr->len=len;
-    stream_read(demuxer->stream, dp_data, len);
-    ds->asf_packet=dp;
diff -urNa mplayer/patches/patch-libmpdemux_demux_vqf_c mplayer.new/patches/patch-libmpdemux_demux_vqf_c
--- mplayer/patches/patch-libmpdemux_demux_vqf_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libmpdemux_demux_vqf_c Thu Jan  1 01:00:00 1970
@@ -1,56 +0,0 @@
-$OpenBSD: patch-libmpdemux_demux_vqf_c,v 1.1 2008/12/15 21:30:07 naddy Exp $
---- libmpdemux/demux_vqf.c.orig Sun Oct  7 21:49:33 2007
-+++ libmpdemux/demux_vqf.c Mon Dec 15 19:10:38 2008
-@@ -50,11 +50,14 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
-     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 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
-     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 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
-     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 @@ static demuxer_t* demux_open_vqf(demuxer_t* demuxer) {
-     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 -urNa mplayer/patches/patch-libpostproc_postprocess_template_c mplayer.new/patches/patch-libpostproc_postprocess_template_c
--- mplayer/patches/patch-libpostproc_postprocess_template_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-libpostproc_postprocess_template_c Thu Jan  1 01:00:00 1970
@@ -1,36 +0,0 @@
-$OpenBSD: patch-libpostproc_postprocess_template_c,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
---- libpostproc/postprocess_template.c.orig Mon Jan 21 16:47:04 2008
-+++ libpostproc/postprocess_template.c Mon Jan 21 16:47:55 2008
-@@ -3747,7 +3747,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
-                                 //FIXME filter first line
-                                         if(y>0) RENAME(dering)(dstBlock - stride - 8, stride, &c);
-                                 }
--
-+#if 0
-                                 if(mode & TEMP_NOISE_FILTER)
-                                 {
-                                         RENAME(tempNoiseReducer)(dstBlock-8, stride,
-@@ -3755,6 +3755,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
-                                                 c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
-                                                 c.ppMode.maxTmpNoise);
-                                 }
-+#endif
-                         }
-
-                         dstBlock+=8;
-@@ -3772,6 +3773,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
-                                 if(y > 0) RENAME(dering)(dstBlock - dstStride - 8, dstStride, &c);
-                 }
-
-+#if 0
-                 if((mode & TEMP_NOISE_FILTER))
-                 {
-                         RENAME(tempNoiseReducer)(dstBlock-8, dstStride,
-@@ -3779,6 +3781,7 @@ static void RENAME(postProcess)(uint8_t src[], int src
-                                 c.tempBluredPast[isColor] + (y>>3)*256 + (x>>3),
-                                 c.ppMode.maxTmpNoise);
-                 }
-+#endif
-
-                 /* did we use a tmp buffer for the last lines*/
-                 if(y+15 >= height)
diff -urNa mplayer/patches/patch-loader_wrapper_S mplayer.new/patches/patch-loader_wrapper_S
--- mplayer/patches/patch-loader_wrapper_S Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-loader_wrapper_S Thu Jan  1 01:00:00 1970
@@ -1,93 +0,0 @@
-$OpenBSD: patch-loader_wrapper_S,v 1.3 2004/10/18 06:48:20 biorn Exp $
---- loader/wrapper.S.orig Mon Nov 25 21:37:12 2002
-+++ loader/wrapper.S Thu Jul 15 09:29:23 2004
-@@ -1,27 +1,36 @@
-+#include "../mangle.h"
-+#if defined(__OpenBSD__) && !defined(__ELF__)
-+.data
-+#else
- .section .data
--.globl caller_return
--caller_return:
-+#endif
-+.globl MANGLEA(caller_return)
-+MANGLEA(caller_return):
- .long 0
--.globl report_entry
--report_entry:
-- .long null_call
--.globl report_ret
--report_ret:
-- .long null_call
--.global wrapper_target
--wrapper_target:
-- .long null_call
-+.globl MANGLEA(report_entry)
-+MANGLEA(report_entry):
-+ .long MANGLEA(null_call)
-+.globl MANGLEA(report_ret)
-+MANGLEA(report_ret):
-+ .long MANGLEA(null_call)
-+.global MANGLEA(wrapper_target)
-+MANGLEA(wrapper_target):
-+ .long MANGLEA(null_call)
-
-+#if defined(__OpenBSD__) && !defined(__ELF__)
-+.text
-+#else
- .section .text
--.globl null_call
-- .type null_call, @function
-+#endif
-+.globl MANGLEA(null_call)
-+ .type MANGLEA(null_call), @function
- .balign 16,0x90
--null_call:
-+MANGLEA(null_call):
- ret
--.globl wrapper
-- .type wrapper, @function
-+.globl MANGLEA(wrapper)
-+ .type MANGLEA(wrapper), @function
- .balign 16,0x90
--wrapper:
-+MANGLEA(wrapper):
- pusha # store registers (EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI)
- pushf # store flags
-
-@@ -39,7 +48,7 @@ wrapper:
- push %eax
- push %edx
-
-- call *report_entry # report entry
-+ call *MANGLEA(report_entry) # report entry
-
- test %eax, %eax
- jnz .Ldone
-@@ -48,14 +57,14 @@ wrapper:
- popf # restore flags
- popa # restore registers
-
-- popl caller_return # switch return addresses
-+ popl MANGLEA(caller_return) # switch return addresses
- pushl $.Lwrapper_return
-
-- jmp *wrapper_target # wrapper_target should return at .Lwrapper_return
-+ jmp *MANGLEA(wrapper_target) # wrapper_target should return at .Lwrapper_return
-
- .balign 16, 0x90
- .Lwrapper_return:
-- pushl caller_return # restore the original return address
-+ pushl MANGLEA(caller_return) # restore the original return address
- pusha # more for reference sake here
- pushf
-
-@@ -73,7 +82,7 @@ wrapper:
- push %eax
- push %edx
-
-- call *report_ret # report the return information (same args)
-+ call *MANGLEA(report_ret) # report the return information (same args)
- .Ldone:
-
- leave
diff -urNa mplayer/patches/patch-mangle_h mplayer.new/patches/patch-mangle_h
--- mplayer/patches/patch-mangle_h Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-mangle_h Thu Jan  1 01:00:00 1970
@@ -1,14 +0,0 @@
-$OpenBSD: patch-mangle_h,v 1.4 2008/02/08 17:32:42 jakemsr Exp $
---- mangle.h.orig Sun Oct  7 12:49:33 2007
-+++ mangle.h Sun Dec 16 21:06:56 2007
-@@ -11,8 +11,10 @@
- #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \
-    (defined(__OpenBSD__) && !defined(__ELF__)) || defined(__APPLE__)
- #define MANGLE(a) "_" #a
-+#define MANGLEA(a) _ ## a
- #else
- #define MANGLE(a) #a
-+#define MANGLEA(a) a
- #endif
-
- #endif /* !MANGLE_H */
diff -urNa mplayer/patches/patch-mencoder_c mplayer.new/patches/patch-mencoder_c
--- mplayer/patches/patch-mencoder_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-mencoder_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-mencoder_c,v 1.3 2008/02/08 17:32:42 jakemsr Exp $
---- mencoder.c.orig Sun Oct  7 12:49:33 2007
-+++ mencoder.c Sun Dec 16 21:06:56 2007
-@@ -1506,6 +1506,7 @@ if(sh_audio && !demuxer2){
-
- } // while(!at_eof)
-
-+mux_v->aspect=sh_video->aspect;
- if (!interrupted && filelist[++curfile].name != 0) {
- if (sh_video && sh_video->vfilter) { // Before uniniting sh_video and the filter chain, break apart the VE.
-   vf_instance_t * ve; // this will be the filter right before the ve.
diff -urNa mplayer/patches/patch-mp3lib_layer2_c mplayer.new/patches/patch-mp3lib_layer2_c
--- mplayer/patches/patch-mp3lib_layer2_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-mp3lib_layer2_c Thu Jan  1 01:00:00 1970
@@ -1,15 +0,0 @@
-$OpenBSD: patch-mp3lib_layer2_c,v 1.5 2007/04/19 08:37:09 ajacoutot Exp $
---- mp3lib/layer2.c.orig Sun Jun 11 20:35:43 2006
-+++ mp3lib/layer2.c Thu Apr 19 09:41:04 2007
-@@ -294,6 +294,11 @@ static int do_layer2(struct frame *fr,int outmode)
-   fr->jsbound = (fr->mode == MPG_MD_JOINT_STEREO) ?
-      (fr->mode_ext<<2)+4 : fr->II_sblimit;
-
-+  if (fr->jsbound > fr->II_sblimit) {
-+         fprintf(stderr, "Truncating stereo boundary to sideband limit.\n");
-+         fr->jsbound=fr->II_sblimit;
-+  }
-+
-   if(stereo == 1 || single == 3)
-     single = 0;
-
diff -urNa mplayer/patches/patch-mpcommon_mak mplayer.new/patches/patch-mpcommon_mak
--- mplayer/patches/patch-mpcommon_mak Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-mpcommon_mak Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-mpcommon_mak,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
---- mpcommon.mak.orig Mon Jan 21 14:55:57 2008
-+++ mpcommon.mak Mon Jan 21 14:56:09 2008
-@@ -8,7 +8,7 @@ OBJS_MENCODER  += $(addsuffix .o, $(basename $(SRCS_ME
-
- CFLAGS-$(LIBAVCODEC)     += -I../libavcodec
- CFLAGS-$(LIBAVFORMAT)    += -I../libavformat
--CFLAGS += $(CFLAGS-yes) $(OPTFLAGS)
-+CFLAGS := $(CFLAGS-yes) $(OPTFLAGS)
-
- LIBS-$(MPLAYER)  += $(LIBNAME_MPLAYER)
- LIBS-$(MENCODER) += $(LIBNAME_MENCODER)
diff -urNa mplayer/patches/patch-mplayer_c mplayer.new/patches/patch-mplayer_c
--- mplayer/patches/patch-mplayer_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-mplayer_c Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-mplayer_c,v 1.8 2008/02/08 17:32:42 jakemsr Exp $
---- mplayer.c.orig Sun Oct  7 12:49:33 2007
-+++ mplayer.c Sun Dec 16 21:06:56 2007
-@@ -774,7 +774,7 @@ static void exit_sighandler(int x){
-         gdb_pid = fork();
-         mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");
-         if (gdb_pid == 0) { // We are the child
--          if (execlp("gdb", "gdb", prog_path, spid, NULL) == -1)
-+          if (execlp("gdb", "gdb", prog_path, spid, (char *)NULL) == -1)
-             mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
-         } else if (gdb_pid < 0)
-           mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
diff -urNa mplayer/patches/patch-stream_Makefile mplayer.new/patches/patch-stream_Makefile
--- mplayer/patches/patch-stream_Makefile Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-stream_Makefile Thu Jan  1 01:00:00 1970
@@ -1,12 +0,0 @@
-$OpenBSD: patch-stream_Makefile,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
---- stream/Makefile.orig Sun Oct  7 12:49:26 2007
-+++ stream/Makefile Mon Jan 21 12:13:35 2008
-@@ -66,6 +66,8 @@ endif
-
- include ../mpcommon.mak
-
-+stream_dvd.o: CFLAGS := -I.. $(CFLAGS)
-+
- clean::
- rm -f realrtsp/*.o realrtsp/*.a realrtsp/*~ \
- librtsp/*.o librtsp/*.a librtsp/*~ \
diff -urNa mplayer/patches/patch-stream_stream_cddb_c mplayer.new/patches/patch-stream_stream_cddb_c
--- mplayer/patches/patch-stream_stream_cddb_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-stream_stream_cddb_c Thu Jan  1 01:00:00 1970
@@ -1,33 +0,0 @@
-$OpenBSD: patch-stream_stream_cddb_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
---- stream/stream_cddb.c.orig Fri Feb  8 13:34:13 2008
-+++ stream/stream_cddb.c Fri Feb  8 13:38:40 2008
-@@ -53,6 +53,7 @@
- #include "version.h"
- #include "stream.h"
- #include "network.h"
-+#include "libavutil/intreadwrite.h"
-
- #define DEFAULT_FREEDB_SERVER "freedb.freedb.org"
- #define DEFAULT_CACHE_DIR "/.cddb/"
-@@ -453,8 +454,9 @@ cddb_parse_matches_list(HTTP_header_t *http_hdr, cddb_
- } else {
- len = ptr2-ptr+1;
- }
-+ len = FFMIN(sizeof(album_title) - 1, len);
- strncpy(album_title, ptr, len);
-- album_title[len-2]='\0';
-+ album_title[len]='\0';
- }
- mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
- return 0;
-@@ -490,8 +492,9 @@ cddb_query_parse(HTTP_header_t *http_hdr, cddb_data_t
- } else {
- len = ptr2-ptr+1;
- }
-+ len = FFMIN(sizeof(album_title) - 1, len);
- strncpy(album_title, ptr, len);
-- album_title[len-2]='\0';
-+ album_title[len]='\0';
- }
- mp_msg(MSGT_DEMUX, MSGL_STATUS, MSGTR_MPDEMUX_CDDB_ParseOKFoundAlbumTitle, album_title);
- return cddb_request_titles(cddb_data);
diff -urNa mplayer/patches/patch-stream_tvi_bsdbt848_c mplayer.new/patches/patch-stream_tvi_bsdbt848_c
--- mplayer/patches/patch-stream_tvi_bsdbt848_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-stream_tvi_bsdbt848_c Thu Jan  1 01:00:00 1970
@@ -1,200 +0,0 @@
-$OpenBSD: patch-stream_tvi_bsdbt848_c,v 1.1 2008/02/08 17:32:42 jakemsr Exp $
---- stream/tvi_bsdbt848.c.orig Sun Oct  7 12:49:26 2007
-+++ stream/tvi_bsdbt848.c Mon Dec 17 14:49:10 2007
-@@ -36,6 +36,7 @@
- #include <sys/time.h>
- #include <signal.h>
- #include <string.h>
-+#include <errno.h>
-
- #include <sys/param.h>
- #ifdef USE_SUN_AUDIO
-@@ -50,6 +51,7 @@
- #include IOCTL_BT848_H_NAME
- #endif
-
-+#ifndef __OpenBSD__
- #ifdef HAVE_SYS_SOUNDCARD_H
- #include <sys/soundcard.h>
- #else
-@@ -59,6 +61,7 @@
- #include <machine/soundcard.h>
- #endif
- #endif
-+#endif
-
- #include "libaf/af_format.h"
- #include "libmpcodecs/img_format.h"
-@@ -141,9 +144,14 @@ typedef struct {
-
- #include "tvi_def.h"
-
-+static int sources[6] = { METEOR_INPUT_DEV1, METEOR_INPUT_DEV0, METEOR_INPUT_DEV2,
-+    METEOR_INPUT_DEV3, METEOR_INPUT_DEV_RGB, METEOR_INPUT_DEV_SVIDEO };
-+
-+
- static priv_t *G_private=NULL;
-
- static int getinput(int innumber);
-+static int getsource(int insrc);
-
- static void processframe(int signal)
- {
-@@ -314,7 +322,14 @@ static int control(priv_t *priv, int cmd, void *arg)
-         {
-         int dspspeed = *(int *)arg;
-
-+#if defined(__OpenBSD__)
-+           audio_info_t audio_if;
-+           AUDIO_INITINFO(&audio_if);
-+           audio_if.record.sample_rate = dspspeed;
-+           if (ioctl(priv->dspfd, AUDIO_SETINFO, &audio_if) == -1)
-+#else
-            if(ioctl(priv->dspfd, SNDCTL_DSP_SPEED, &dspspeed) == -1)
-+#endif
-             {
-             mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848InvalidAudioRate, strerror(errno));
-             return(TVI_CONTROL_FALSE);
-@@ -525,7 +540,12 @@ static int init(priv_t *priv)
- int marg;
- int count;
- u_short tmp_fps;
-+int tuner_audio;
-+#if defined(__OpenBSD__)
-+audio_info_t audio_if;
-+#endif
-
-+
- G_private = priv; /* Oooh, sick */
-
- /* Video Configuration */
-@@ -536,7 +556,7 @@ priv->iformat = METEOR_FMT_PAL;
- priv->maxheight = PAL_HEIGHT;
- priv->maxwidth = PAL_WIDTH;
- priv->maxfps = PAL_FPS;
--priv->source = METEOR_INPUT_DEV0;
-+priv->source = METEOR_INPUT_DEV1;
- priv->fps = priv->maxfps;
-
- priv->starttime=0;
-@@ -622,13 +642,33 @@ if(priv->tunerfd < 0)
-     priv->tunerready = FALSE;
-     }
-
-+if(ioctl(priv->tunerfd, BT848_GAUDIO, &tuner_audio) < 0)
-+    {
-+    perror("tuner get audio");
-+    priv->tunerready = FALSE;
-+    }
-+if(tuner_audio & AUDIO_MUTE)
-+    {
-+    tuner_audio = AUDIO_UNMUTE;
-+    if(ioctl(priv->tunerfd, BT848_SAUDIO, &tuner_audio) < 0)
-+        {
-+        perror("tuner unmute");
-+        priv->tunerready = FALSE;
-+        }
-+    }
-+
-+
- /* Audio Configuration */
-
- priv->dspready = TRUE;
- priv->dspsamplesize = 16;
- priv->dspstereo = 1;
- priv->dspspeed = 44100;
-+#if defined (__OpenBSD__)
-+priv->dspfmt = AUDIO_ENCODING_SLINEAR_LE;
-+#else
- priv->dspfmt = AFMT_S16_LE;
-+#endif
- priv->dspbytesread = 0;
- priv->dsprate = priv->dspspeed * priv->dspsamplesize/8*(priv->dspstereo+1);
- priv->dspframesize = priv->dspspeed*priv->dspsamplesize/8/priv->fps *
-@@ -642,6 +682,26 @@ if((priv->dspfd = open (priv->dspdev, O_RDONLY, 0)) <
-
- marg = (256 << 16) | 12;
-
-+#if defined(__OpenBSD__)
-+
-+    AUDIO_INITINFO(&audio_if);
-+
-+    audio_if.record.precision = priv->dspsamplesize;
-+    audio_if.record.channels = priv->dspstereo+1;
-+    audio_if.record.sample_rate = priv->dspspeed;
-+    audio_if.record.encoding = priv->dspfmt;
-+
-+    audio_if.mode = AUMODE_RECORD;
-+
-+    if (ioctl(priv->dspfd, AUDIO_SETINFO, &audio_if) < 0)
-+        {
-+        perror ("AUDIO_SETINFO:ioctl");
-+        close(priv->dspfd);
-+        priv->dspready = FALSE;
-+        }
-+
-+#else
-+
- if (ioctl(priv->dspfd, SNDCTL_DSP_SETFRAGMENT, &marg ) < 0 )
-     {
-     mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "SNDCTL_DSP_SETFRAGMENT", strerror(errno));
-@@ -659,6 +719,8 @@ if((priv->dspready == TRUE) &&
-     priv->dspready = FALSE;
-     }
-
-+#endif
-+
- return(1);
- }
-
-@@ -703,6 +765,7 @@ return(1);
- static int uninit(priv_t *priv)
- {
- int marg;
-+int tuner_audio;
-
- if(priv->videoready == FALSE) return(0);
-
-@@ -725,6 +788,15 @@ if(ioctl(priv->btfd, METEORCAPTUR, &marg) < 0 )
- close(priv->btfd);
- close(priv->dspfd);
-
-+tuner_audio = AUDIO_MUTE;
-+if(ioctl(priv->tunerfd, BT848_SAUDIO, &tuner_audio) < 0)
-+    {
-+    perror("tuner mute");
-+    priv->tunerready = FALSE;
-+    }
-+
-+close(priv->tunerfd);
-+
- priv->dspfd = -1;
- priv->btfd = -1;
-
-@@ -869,22 +941,15 @@ if(ioctl(priv->dspfd, FIONREAD, &bytesavail) < 0)
- /* When mencoder wants audio data, it wants data..
-    it won't go do anything else until it gets it :( */
-
--if(bytesavail == 0) return FRAGSIZE;
-+// if(bytesavail == 0) return FRAGSIZE;
-
- return(bytesavail);
- }
-
- static int getinput(int innumber)
- {
--switch(innumber)
--    {
--    case 0: return METEOR_INPUT_DEV0;     /* RCA   */
--    case 1: return METEOR_INPUT_DEV1;     /* Tuner */
--    case 2: return METEOR_INPUT_DEV2;     /* In 1  */
--    case 3: return METEOR_INPUT_DEV3;     /* In 2  */
--    case 4: return METEOR_INPUT_DEV_RGB;     /* RGB   */
--    case 5: return METEOR_INPUT_DEV_SVIDEO; /* SVid  */
--    }
--
-+if (sources[innumber])
-+    return sources[innumber];
-+    
- return 0;
- }
diff -urNa mplayer/patches/patch-stream_tvi_v4l2_c mplayer.new/patches/patch-stream_tvi_v4l2_c
--- mplayer/patches/patch-stream_tvi_v4l2_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-stream_tvi_v4l2_c Wed Jul  8 19:17:03 2009
@@ -1,17 +1,19 @@
-$OpenBSD: patch-stream_tvi_v4l2_c,v 1.1 2008/09/03 12:20:52 brad Exp $
---- stream/tvi_v4l2.c.orig Mon Sep  1 22:57:10 2008
-+++ stream/tvi_v4l2.c Mon Sep  1 22:57:48 2008
-@@ -38,8 +38,13 @@ known issues:
+$OpenBSD$
+--- stream/tvi_v4l2.c.orig Wed Jul  8 19:15:35 2009
++++ stream/tvi_v4l2.c Wed Jul  8 19:16:54 2009
+@@ -49,8 +49,15 @@ known issues:
  #ifdef HAVE_SYS_SYSINFO_H
  #include <sys/sysinfo.h>
  #endif
-+#ifdef __linux__
++
++/* OpenBSD modifications <linux/*> not available */
++/*
  #include <linux/types.h>
  #include <linux/videodev2.h>
-+#endif
-+#ifdef __OpenBSD__
++*/
 +#include <sys/videoio.h>
-+#endif
++/* END OpenBSD stuff */
++
  #include "mp_msg.h"
  #include "libmpcodecs/img_format.h"
  #include "libaf/af_format.h"
diff -urNa mplayer/patches/patch-stream_tvi_v4l2_c~ mplayer.new/patches/patch-stream_tvi_v4l2_c~
--- mplayer/patches/patch-stream_tvi_v4l2_c~ Thu Jan  1 01:00:00 1970
+++ mplayer.new/patches/patch-stream_tvi_v4l2_c~ Wed Jul  8 19:16:57 2009
@@ -0,0 +1,19 @@
+$OpenBSD$
+--- stream/tvi_v4l2.c.orig Wed Jul  8 19:15:35 2009
++++ stream/tvi_v4l2.c Wed Jul  8 19:16:54 2009
+@@ -49,8 +49,15 @@ known issues:
+ #ifdef HAVE_SYS_SYSINFO_H
+ #include <sys/sysinfo.h>
+ #endif
++
++/* OpenBSD modifications <linux/*> not available */
++/*
+ #include <linux/types.h>
+ #include <linux/videodev2.h>
++*/
++#include <sys/videoio.h>
++/* END OpenBSD stuff */
++
+ #include "mp_msg.h"
+ #include "libmpcodecs/img_format.h"
+ #include "libaf/af_format.h"
diff -urNa mplayer/patches/patch-stream_url_c mplayer.new/patches/patch-stream_url_c
--- mplayer/patches/patch-stream_url_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-stream_url_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-stream_url_c,v 1.1 2008/02/11 00:22:03 jakemsr Exp $
---- stream/url.c.orig Fri Feb  8 13:32:35 2008
-+++ stream/url.c Fri Feb  8 13:33:05 2008
-@@ -328,6 +328,7 @@ url_escape_string(char *outbuf, const char *inbuf) {
- }
- }
-
-+ tmp = NULL;
- while(i < len) {
- // look for the next char that must be kept
- for  (j=i;j<len;j++) {
diff -urNa mplayer/patches/patch-tremor_block_c mplayer.new/patches/patch-tremor_block_c
--- mplayer/patches/patch-tremor_block_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_block_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-tremor_block_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/block.c.orig Sun Oct  7 20:49:27 2007
-+++ tremor/block.c Sun Mar 30 22:26:40 2008
-@@ -25,6 +25,7 @@
- #include "window.h"
- #include "registry.h"
- #include "misc.h"
-+#include "block.h"
-
- static int ilog(unsigned int v){
-   int ret=0;
diff -urNa mplayer/patches/patch-tremor_block_h mplayer.new/patches/patch-tremor_block_h
--- mplayer/patches/patch-tremor_block_h Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_block_h Thu Jan  1 01:00:00 1970
@@ -1,28 +0,0 @@
-$OpenBSD: patch-tremor_block_h,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/block.h.orig Sat Mar 29 16:17:25 2008
-+++ tremor/block.h Sat Mar 29 16:17:25 2008
-@@ -0,0 +1,24 @@
-+/********************************************************************
-+ *                                                                  *
-+ * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE.   *
-+ *                                                                  *
-+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
-+ * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
-+ * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
-+ *                                                                  *
-+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
-+ * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
-+ *                                                                  *
-+ ********************************************************************
-+
-+ function: basic shared block operations
-+
-+ ********************************************************************/
-+
-+#ifndef _V_BLOCK_H_
-+#define _V_BLOCK_H_
-+
-+void *_vorbis_block_alloc(vorbis_block *vb,long bytes);
-+void _vorbis_block_ripcord(vorbis_block *vb);
-+
-+#endif
diff -urNa mplayer/patches/patch-tremor_floor0_c mplayer.new/patches/patch-tremor_floor0_c
--- mplayer/patches/patch-tremor_floor0_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_floor0_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-tremor_floor0_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/floor0.c.orig Sun Oct  7 20:49:27 2007
-+++ tremor/floor0.c Sun Mar 30 22:26:40 2008
-@@ -25,6 +25,7 @@
- #include "codebook.h"
- #include "misc.h"
- #include "os.h"
-+#include "block.h"
-
- #define LSP_FRACBITS 14
-
diff -urNa mplayer/patches/patch-tremor_floor1_c mplayer.new/patches/patch-tremor_floor1_c
--- mplayer/patches/patch-tremor_floor1_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_floor1_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-tremor_floor1_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/floor1.c.orig Sun Oct  7 20:49:27 2007
-+++ tremor/floor1.c Sun Mar 30 22:26:40 2008
-@@ -24,6 +24,7 @@
- #include "registry.h"
- #include "codebook.h"
- #include "misc.h"
-+#include "block.h"
-
- #define floor1_rangedB 140 /* floor 1 fixed at -140dB to 0dB range */
-
diff -urNa mplayer/patches/patch-tremor_res012_c mplayer.new/patches/patch-tremor_res012_c
--- mplayer/patches/patch-tremor_res012_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_res012_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-tremor_res012_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/res012.c.orig Sun Oct  7 20:49:27 2007
-+++ tremor/res012.c Sun Mar 30 22:26:40 2008
-@@ -25,6 +25,7 @@
- #include "codebook.h"
- #include "misc.h"
- #include "os.h"
-+#include "block.h"
-
- typedef struct {
-   vorbis_info_residue0 *info;
diff -urNa mplayer/patches/patch-tremor_synthesis_c mplayer.new/patches/patch-tremor_synthesis_c
--- mplayer/patches/patch-tremor_synthesis_c Wed Jul  8 20:14:05 2009
+++ mplayer.new/patches/patch-tremor_synthesis_c Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-$OpenBSD: patch-tremor_synthesis_c,v 1.1 2008/03/30 20:39:41 fgsch Exp $
---- tremor/synthesis.c.orig Sun Oct  7 20:49:27 2007
-+++ tremor/synthesis.c Sun Mar 30 22:26:40 2008
-@@ -23,6 +23,7 @@
- #include "registry.h"
- #include "misc.h"
- #include "os.h"
-+#include "block.h"
-
- int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){
-   vorbis_dsp_state     *vd=vb->vd;

Re: mplayer update effort

by j4nKy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:

> I was hoping someone could help me out here, as I am getting assembler
> errors, which I do not have enough knowledge to debug. It seems I
> only get these when using external versions of various libraries, as
> bulding mplayer standalone works fine (I built one in /opt).
>
> Does anyone know how to start debugging this:
>
> cc -Wundef -Wdisabled-optimization -std=gnu99 -O2 -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Ilibdvdread4 -I. -I/usr/local/include -D_THREAD_SAFE -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/ include -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -I/usr/X11R6/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/X11R6/include/pixman-1 -I/usr/local/include -I/usr/local/include/libpng -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include/freetype2   -c -o liba52/resample.o liba52/resample.c
> {standard input}: Assembler messages:
> {standard input}:884: Error: junk `C magicF2W' after expression
> {standard input}:885: Error: junk `C wm1100' after expression
> {standard input}:886: Error: junk `C wm0101' after expression
> {standard input}:887: Error: junk `C wm1010' after expression
> {standard input}:931: Error: junk `C magicF2W' after expression
> {standard input}:971: Error: junk `C magicF2W' after expression
> {standard input}:1034: Error: junk `C magicF2W' after expression
> {standard input}:1095: Error: junk `C magicF2W' after expression
> {standard input}:1163: Error: junk `C magicF2W' after expression
> {standard input}:1214: Error: junk `C magicF2W' after expression
> {standard input}:1261: Error: junk `C magicF2W' after expression
> {standard input}:1310: Error: junk `C magicF2W' after expression
> {standard input}:1364: Error: junk `C magicF2W' after expression
> gmake: *** [liba52/resample.o] Error 1
> *** Error code 2

> I am attaching what I have. It would be great if someone
> could kinda "team up" with me to try and roll out a newer mplayer
> version.

> ++# OpenBSD nm does not understand -P (posix mode on linux)
> ++# sym=$($_nm -P -g $TMPEXE) */
> ++sym=$($_nm -g $TMPEXE)

look at how the ffmpeg ports handles this.  I imagine it probably needs
the workaround for od(1) as well ...

also, it'd probably be a good idea to update libdvdnav to mplayer's
version.  below is a diff for that.  IIRC, I already tested it with
dvdbackup, xine-lib and vlc, although it looks like I made this
update last September (I was trying to get DVD navigation working in
mplayer).  might be a good idea to update libdvdread to mplayer's
version as well?  afaik, they are both API compatible to what
we currently have in ports.

--
jakemsr@...
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/Makefile,v
retrieving revision 1.8
diff -N -u -p Makefile
--- Makefile 16 Sep 2007 03:24:28 -0000 1.8
+++ Makefile 9 Jul 2009 15:44:05 -0000
@@ -1,33 +1,36 @@
 # $OpenBSD: Makefile,v 1.8 2007/09/16 03:24:28 merdely Exp $
 
 COMMENT= DVD read/navigation library
-DISTNAME= libdvdnav-20051102
-PKGNAME= ${DISTNAME}p2
+DISTNAME= libdvdnav-4.1.3
 CATEGORIES= multimedia
 
-SHARED_LIBS= dvdnav 5.0
-MODGNU_SHARED_LIBS= dvdnav '-export-symbols-regex "(^dvdnav.*|^nav.*|^ifo.*|^DVD.*)"'
+SHARED_LIBS= dvdnav 6.0 \
+ dvdnavmini 6.0
 
-MASTER_SITES= http://mirrors.protection.cx/~jolan/
+MASTER_SITES= http://www1.mplayerhq.hu/MPlayer/releases/dvdnav/
 
-HOMEPAGE= http://dvd.sourceforge.net/
-
-# GPL
+# GPLv2
 PERMIT_DISTFILES_CDROM= Yes
 PERMIT_DISTFILES_FTP= Yes
 PERMIT_PACKAGE_CDROM= Yes
 PERMIT_PACKAGE_FTP= Yes
 
+EXTRACT_SUFX= .tar.bz2
+
 AUTOMAKE_VERSION=1.9
 AUTOCONF_VERSION=2.59
 USE_LIBTOOL= Yes
 
 BUILD_DEPENDS= ${MODGNU_AUTOCONF_DEPENDS} ${MODGNU_AUTOMAKE_DEPENDS}
 
+LIB_DEPENDS= dvdread::devel/libdvdread
+
 CONFIGURE_STYLE=gnu
+CONFIGURE_ENV= DVDREAD_CFLAGS="-I${LOCALBASE}/include" \
+ DVDREAD_LIBS="-L${LOCALBASE}/lib -ldvdread"
 
 post-patch:
  cd ${WRKSRC} && env AUTOCONF_VERSION=${AUTOCONF_VERSION} \
- AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh
+ AUTOMAKE_VERSION=${AUTOMAKE_VERSION} ./autogen.sh noconfig
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/distinfo,v
retrieving revision 1.5
diff -N -u -p distinfo
--- distinfo 5 Apr 2007 16:20:07 -0000 1.5
+++ distinfo 9 Jul 2009 15:44:05 -0000
@@ -1,5 +1,5 @@
-MD5 (libdvdnav-20051102.tar.gz) = 7gEsX4cNElPL75nAdsteiw==
-RMD160 (libdvdnav-20051102.tar.gz) = HV4rFN/59syDXV9s45vpEDv9FmQ=
-SHA1 (libdvdnav-20051102.tar.gz) = NHxu+xbQlYcQ8NuV0uBcvNSdOV8=
-SHA256 (libdvdnav-20051102.tar.gz) = CTPpQV4v3gv42otgNsPQzWCcQobnv83GdZJU/vKNJ8g=
-SIZE (libdvdnav-20051102.tar.gz) = 191454
+MD5 (libdvdnav-4.1.3.tar.bz2) = 1iODxFsogWdx4oNRXywn+g==
+RMD160 (libdvdnav-4.1.3.tar.bz2) = fGQ3Iwr2mfaxwtc/BfME8Dq6nc4=
+SHA1 (libdvdnav-4.1.3.tar.bz2) = 0bleuKfK7h+nWAoauthNbLPK0EY=
+SHA256 (libdvdnav-4.1.3.tar.bz2) = 6Co9ezw0KolaMy/A+yKB9A/5l4y4y7i/E0P8rQBjdZ0=
+SIZE (libdvdnav-4.1.3.tar.bz2) = 110843
Index: patches/patch-autogen_sh
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-autogen_sh,v
retrieving revision 1.1
diff -N -u -p patches/patch-autogen_sh
--- patches/patch-autogen_sh 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,151 +0,0 @@
-$OpenBSD: patch-autogen_sh,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- autogen.sh.orig Tue May  3 15:11:34 2005
-+++ autogen.sh Wed Nov  2 14:04:40 2005
-@@ -39,19 +39,13 @@ detect_configure_ac() {
- # AUTOCONF
- #-------------------
- detect_autoconf() {
--  set -- `type autoconf 2>/dev/null`
--  RETVAL=$?
--  NUM_RESULT=$#
--  RESULT_FILE=$3
--  if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
--    AC="`autoconf --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    AUTOCONF_MIN="`echo $AUTOCONF_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    if test $AC -lt 100 ; then
--      AC=`expr $AC \* 10`
--    fi
--    if [ `expr $AC` -ge $AUTOCONF_MIN ]; then
--      autoconf_ok=yes
--    fi
-+  AC="`autoconf --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  AUTOCONF_MIN="`echo $AUTOCONF_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  if test $AC -lt 100 ; then
-+    AC=`expr $AC \* 10`
-+  fi
-+  if [ `expr $AC` -ge $AUTOCONF_MIN ]; then
-+    autoconf_ok=yes
-   else
-     echo
-     echo "**Error**: You must have \`autoconf' >= $AUTOCONF_MIN installed to"
-@@ -91,35 +85,24 @@ run_autoconf () {
- # LIBTOOL
- #-------------------
- try_libtool_executable() {
--  libtool=$1
--  set -- `type $libtool 2>/dev/null`
--  RETVAL=$?
--  NUM_RESULT=$#
--  RESULT_FILE=$3
--  if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
--    LT="`$libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`"
--    LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    if test $LT -lt 100 ; then
--      LT=`expr $LT \* 10`
--    fi
--    if [ `expr $LT` -ge $LIBTOOL_MIN ]; then
--      libtool_ok=yes
--    fi
-+  LT="`libtool --version | sed 1q | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  if test $LT -lt 100 ; then
-+    LT=`expr $LT \* 10`
-   fi
-+  if [ $LT -ge $LIBTOOL_MIN ]; then
-+    libtool_ok=yes
-+  fi
- }
-
- detect_libtool() {
--  # try glibtool first, then libtool
--  try_libtool_executable 'glibtool'
-+  try_libtool_executable
-   if [ "x$libtool_ok" != "xyes" ]; then
--    try_libtool_executable 'libtool'
--    if [ "x$libtool_ok" != "xyes" ]; then
-       echo
-       echo "**Error**: You must have \`libtool' >= $LIBTOOL_MIN installed to"
-       echo "           compile $PROG. Download the appropriate package"
-       echo "           for your distribution or source from ftp.gnu.org."
-       exit 1
--    fi
-   fi
- }
-
-@@ -132,7 +115,7 @@ run_libtoolize() {
-   fi
-
-   echo $_echo_n " + Running libtoolize: $_echo_c";
--    "${libtool}ize" --force --copy >/dev/null 2>&1;
-+    "libtoolize" --force --copy >/dev/null 2>&1;
-   echo "done."
- }
-
-@@ -140,23 +123,13 @@ run_libtoolize() {
- # AUTOMAKE
- #--------------------
- detect_automake() {
--  #
--  # expected output from 'type' is
--  #   automake is /usr/local/bin/automake
--  #
--  set -- `type automake 2>/dev/null`
--  RETVAL=$?
--  NUM_RESULT=$#
--  RESULT_FILE=$3
--  if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
--    AM="`automake --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    AUTOMAKE_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    if test $AM -lt 100 ; then
--      AM=`expr $AM \* 10`
--    fi
--    if [ `expr $AM` -ge $AUTOMAKE_MIN ]; then
--      automake_ok=yes
--    fi
-+  AM="`automake --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  AUTOMAKE_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  if test $AM -lt 100 ; then
-+    AM=`expr $AM \* 10`
-+  fi
-+  if [ `expr $AM` -ge $AUTOMAKE_MIN ]; then
-+    automake_ok=yes
-   else
-     echo
-     echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to"
-@@ -184,21 +157,13 @@ run_automake () {
- # ACLOCAL
- #-------------------
- detect_aclocal() {
--
--  # if no automake, don't bother testing for aclocal
--  set -- `type aclocal 2>/dev/null`
--  RETVAL=$?
--  NUM_RESULT=$#
--  RESULT_FILE=$3
--  if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then
--    AC="`aclocal --version | sed -n 1p | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    ACLOCAL_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
--    if test $AC -lt 100 ; then
--      AC=`expr $AC \* 10`
--    fi
--    if [ `expr $AC` -ge $ACLOCAL_MIN ]; then
--      aclocal_ok=yes
--    fi
-+  AC="`aclocal --version | sed 1q | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  ACLOCAL_MIN="`echo $AUTOMAKE_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`"
-+  if test $AC -lt 100 ; then
-+    AC=`expr $AC \* 10`
-+  fi
-+  if [ `expr $AC` -ge $ACLOCAL_MIN ]; then
-+    aclocal_ok=yes
-   else
-     echo
-     echo "**Error**: You must have \`automake' >= $AUTOMAKE_MIN installed to"
-@@ -280,6 +245,6 @@ case "$1" in
-     run_autoheader
-     run_automake
-     run_autoconf
--    run_configure "$@"
-+    #run_configure "$@"
-     ;;
- esac
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-configure_ac,v
retrieving revision 1.2
diff -N -u -p patches/patch-configure_ac
--- patches/patch-configure_ac 28 Mar 2006 10:25:10 -0000 1.2
+++ patches/patch-configure_ac 9 Jul 2009 15:44:05 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-configure_ac,v 1.2 2006/03/28 10:25:10 jakemsr Exp $
---- configure.ac.orig Sat Mar 25 18:00:02 2006
-+++ configure.ac Sat Mar 25 18:01:37 2006
-@@ -138,6 +138,11 @@ case $host in
+$OpenBSD$
+--- configure.ac.orig Sat Aug 30 06:02:17 2008
++++ configure.ac Mon Sep 15 17:54:08 2008
+@@ -143,6 +143,11 @@ case $host in
      THREAD_CFLAGS="-I/usr/local/include -D_THREAD_SAFE"
      CFLAGS="$THREAD_CFLAGS $CFLAGS"
      ;;
@@ -13,7 +13,31 @@ $OpenBSD: patch-configure_ac,v 1.2 2006/03/28 10:25:10
    *mingw32* | *cygwin*)
      ;;
    *)
-@@ -174,7 +179,7 @@ dnl ------------------------------------
+@@ -178,27 +183,16 @@ esac
+ dnl ---------------------------------------------
+ dnl libdvdread
+ dnl ---------------------------------------------
+-AC_ARG_WITH([dvdread-config],
+-  [AS_HELP_STRING([--with-dvdread-config=PROG],
+-    [dvdread-config program to use @<:@default=from PATH@:>@])],
+-  [DVDREAD_CONFIG="$withval"],
+-  [dnl User didn't specify program, search PATH
+-  AC_PATH_PROG([DVDREAD_CONFIG], [dvdread-config], [no])
+-  test "x$DVDREAD_CONFIG" = xno && \
+-    AC_MSG_ERROR([dvdread-config required to link with libdvdread])
+-  ])
+-DVDREAD_CFLAGS=`$DVDREAD_CONFIG --cflags` || \
+-  AC_MSG_ERROR([Could not get libdvdread CFLAGS from $DVDREAD_CONFIG])
+-DVDREAD_LIBS=`$DVDREAD_CONFIG --libs` || \
+-  AC_MSG_ERROR([Could not get libdvdread LIBS from $DVDREAD_CONFIG])
+-AC_SUBST([DVDREAD_CFLAGS])
+-AC_SUBST([DVDREAD_LIBS])
++DVDREAD_CFLAGS="$DVDREAD_CFLAGS"
++DVDREAD_LIBS="$DVDREAD_LIBS"
++AC_SUBST(DVDREAD_CFLAGS)
++AC_SUBST(DVDREAD_LIBS)
+
+ dnl ---------------------------------------------
  dnl cflags
  dnl ---------------------------------------------
  dnl Common cflags for all platforms
? patches/patch-misc_dvdnav-config_in
Index: patches/patch-src_dvdread_Makefile_am
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_Makefile_am,v
retrieving revision 1.1
diff -N -u -p patches/patch-src_dvdread_Makefile_am
--- patches/patch-src_dvdread_Makefile_am 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,10 +0,0 @@
-$OpenBSD: patch-src_dvdread_Makefile_am,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- src/dvdread/Makefile.am.orig Thu Jul 22 18:25:24 2004
-+++ src/dvdread/Makefile.am Thu Jul 22 18:25:53 2004
-@@ -13,4 +13,5 @@ libdvdread_la_SOURCES = dvd_reader.c nav
- libdvdread_la_LIBADD = $(DYNAMIC_LD_LIBS)
-
- include_HEADERS = dvd_reader.h nav_read.h ifo_read.h \
-- nav_print.h ifo_print.h ifo_types.h nav_types.h
-+ nav_print.h ifo_print.h ifo_types.h nav_types.h\
-+ dvd_udf.h
Index: patches/patch-src_dvdread_dvd_input_c
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_input_c,v
retrieving revision 1.2
diff -N -u -p patches/patch-src_dvdread_dvd_input_c
--- patches/patch-src_dvdread_dvd_input_c 9 Nov 2005 16:37:46 -0000 1.2
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,269 +0,0 @@
-$OpenBSD: patch-src_dvdread_dvd_input_c,v 1.2 2005/11/09 16:37:46 jolan Exp $
---- src/dvdread/dvd_input.c.orig Fri Apr  9 07:15:26 2004
-+++ src/dvdread/dvd_input.c Wed Nov  9 10:31:53 2005
-@@ -37,17 +37,17 @@ int         (*dvdinput_read)  (dvd_input
- char *      (*dvdinput_error) (dvd_input_t);
-
- #ifdef HAVE_DVDCSS_DVDCSS_H
--/* linking to libdvdcss */
--#include <dvdcss/dvdcss.h>
--#define DVDcss_open(a) dvdcss_open((char*)(a))
--#define DVDcss_close   dvdcss_close
--#define DVDcss_seek    dvdcss_seek
--#define DVDcss_title   dvdcss_title
--#define DVDcss_read    dvdcss_read
--#define DVDcss_error   dvdcss_error
-+/* linking to dvdcss */
-+#include <libdvd/libdvd.h>
-+#define DVD_open(a) libdvd_open((char*)(a))
-+#define DVD_close   libdvd_close
-+#define DVD_seek    libdvd_seek
-+#define DVD_title   libdvd_title
-+#define DVD_read    libdvd_read
-+#define DVD_error   libdvd_error
- #else
-
--/* dlopening libdvdcss */
-+/* dlopening dvdcss */
- #ifdef HAVE_DLFCN_H
- #include <dlfcn.h>
- #else
-@@ -55,19 +55,19 @@ char *      (*dvdinput_error) (dvd_input
- #include "../../msvc/contrib/dlfcn.c"
- #endif
-
--typedef struct dvdcss_s *dvdcss_handle;
--static dvdcss_handle (*DVDcss_open)  (const char *);
--static int           (*DVDcss_close) (dvdcss_handle);
--static int           (*DVDcss_seek)  (dvdcss_handle, int, int);
--static int           (*DVDcss_title) (dvdcss_handle, int);
--static int           (*DVDcss_read)  (dvdcss_handle, void *, int, int);
--static char *        (*DVDcss_error) (dvdcss_handle);
-+typedef struct libdvd_s *libdvd_handle;
-+static libdvd_handle (*DVD_open)  (const char *);
-+static int           (*DVD_close) (libdvd_handle);
-+static int           (*DVD_seek)  (libdvd_handle, int, int);
-+static int           (*DVD_title) (libdvd_handle, int);
-+static int           (*DVD_read)  (libdvd_handle, void *, int, int);
-+static char *        (*DVD_error) (libdvd_handle);
- #endif
-
- /* The DVDinput handle, add stuff here for new input methods. */
- struct dvd_input_s {
--  /* libdvdcss handle */
--  dvdcss_handle dvdcss;
-+  /* dvdcss handle */
-+  libdvd_handle libdvd;
-  
-   /* dummy file input */
-   int fd;
-@@ -77,7 +77,7 @@ struct dvd_input_s {
- /**
-  * initialize and open a DVD device or file.
-  */
--static dvd_input_t css_open(const char *target)
-+static dvd_input_t libdvd_open(const char *target)
- {
-   dvd_input_t dev;
-    
-@@ -88,10 +88,10 @@ static dvd_input_t css_open(const char *
-     return NULL;
-   }
-  
--  /* Really open it with libdvdcss */
--  dev->dvdcss = DVDcss_open(target);
--  if(dev->dvdcss == 0) {
--    fprintf(stderr, "libdvdread: Could not open %s with libdvdcss.\n", target);
-+  /* Really open it with dvdcss */
-+  dev->libdvd = DVD_open(target);
-+  if(dev->libdvd == 0) {
-+    fprintf(stderr, "libdvdread: Could not open %s with libdvd.\n", target);
-     free(dev);
-     return NULL;
-   }
-@@ -102,44 +102,44 @@ static dvd_input_t css_open(const char *
- /**
-  * return the last error message
-  */
--static char *css_error(dvd_input_t dev)
-+static char *libdvd_error(dvd_input_t dev)
- {
--  return DVDcss_error(dev->dvdcss);
-+  return DVD_error(dev->libdvd);
- }
-
- /**
-  * seek into the device.
-  */
--static int css_seek(dvd_input_t dev, int blocks)
-+static int libdvd_seek(dvd_input_t dev, int blocks)
- {
-   /* DVDINPUT_NOFLAGS should match the DVDCSS_NOFLAGS value. */
--  return DVDcss_seek(dev->dvdcss, blocks, DVDINPUT_NOFLAGS);
-+  return DVD_seek(dev->libdvd, blocks, DVDINPUT_NOFLAGS);
- }
-
- /**
-  * set the block for the begining of a new title (key).
-  */
--static int css_title(dvd_input_t dev, int block)
-+static int libdvd_title(dvd_input_t dev, int block)
- {
--  return DVDcss_title(dev->dvdcss, block);
-+  return DVD_title(dev->libdvd, block);
- }
-
- /**
-  * read data from the device.
-  */
--static int css_read(dvd_input_t dev, void *buffer, int blocks, int flags)
-+static int libdvd_read(dvd_input_t dev, void *buffer, int blocks, int flags)
- {
--  return DVDcss_read(dev->dvdcss, buffer, blocks, flags);
-+  return DVD_read(dev->libdvd, buffer, blocks, flags);
- }
-
- /**
-  * close the DVD device and clean up the library.
-  */
--static int css_close(dvd_input_t dev)
-+static int libdvd_close(dvd_input_t dev)
- {
-   int ret;
-
--  ret = DVDcss_close(dev->dvdcss);
-+  ret = DVD_close(dev->libdvd);
-
-   if(ret < 0)
-     return ret;
-@@ -271,88 +271,88 @@ static int file_close(dvd_input_t dev)
-
-
- /**
-- * Setup read functions with either libdvdcss or minimal DVD access.
-+ * Setup read functions with either libdvd or minimal DVD access.
-  */
- int dvdinput_setup(void)
- {
--  void *dvdcss_library = NULL;
--  char **dvdcss_version = NULL;
-+  void *libdvd_library = NULL;
-+  char **libdvd_version = NULL;
-
- #ifdef HAVE_DVDCSS_DVDCSS_H
--  /* linking to libdvdcss */
--  dvdcss_library = &dvdcss_library;  /* Give it some value != NULL */
--  /* the DVDcss_* functions have been #defined at the top */
--  dvdcss_version = &dvdcss_interface_2;
-+  /* linking to libdvd */
-+  libdvd_library = &libdvd_library;  /* Give it some value != NULL */
-+  /* the DVD_* functions have been #defined at the top */
-+  libdvd_version = &libdvd_interface_2;
-
- #else
--  /* dlopening libdvdcss */
-+  /* dlopening libdvd */
-
- #ifndef WIN32
--  dvdcss_library = dlopen("libdvdcss.so.2", RTLD_LAZY);
-+  libdvd_library = dlopen("libdvd.so.0", RTLD_LAZY);
- #else
-   dvdcss_library = dlopen("libdvdcss.dll", RTLD_LAZY);
- #endif
-
--  if(dvdcss_library != NULL) {
-+  if(libdvd_library != NULL) {
- #if defined(__OpenBSD__) && !defined(__ELF__)
- #define U_S "_"
- #else
- #define U_S
- #endif
--    DVDcss_open = (dvdcss_handle (*)(const char*))
--      dlsym(dvdcss_library, U_S "dvdcss_open");
--    DVDcss_close = (int (*)(dvdcss_handle))
--      dlsym(dvdcss_library, U_S "dvdcss_close");
--    DVDcss_title = (int (*)(dvdcss_handle, int))
--      dlsym(dvdcss_library, U_S "dvdcss_title");
--    DVDcss_seek = (int (*)(dvdcss_handle, int, int))
--      dlsym(dvdcss_library, U_S "dvdcss_seek");
--    DVDcss_read = (int (*)(dvdcss_handle, void*, int, int))
--      dlsym(dvdcss_library, U_S "dvdcss_read");
--    DVDcss_error = (char* (*)(dvdcss_handle))
--      dlsym(dvdcss_library, U_S "dvdcss_error");
--    
--    dvdcss_version = (char **)dlsym(dvdcss_library, U_S "dvdcss_interface_2");
-+    DVD_open = (libdvd_handle (*)(const char*))
-+      dlsym(libdvd_library, U_S "libdvd_open");
-+    DVD_close = (int (*)(libdvd_handle))
-+      dlsym(libdvd_library, U_S "libdvd_close");
-+    DVD_title = (int (*)(libdvd_handle, int))
-+      dlsym(libdvd_library, U_S "libdvd_title");
-+    DVD_seek = (int (*)(libdvd_handle, int, int))
-+      dlsym(libdvd_library, U_S "libdvd_seek");
-+    DVD_read = (int (*)(libdvd_handle, void*, int, int))
-+      dlsym(libdvd_library, U_S "libdvd_read");
-+    DVD_error = (char* (*)(libdvd_handle))
-+      dlsym(libdvd_library, U_S "libdvd_error");
-
--    if(dlsym(dvdcss_library, U_S "dvdcss_crack")) {
-+    libdvd_version = (char **)dlsym(libdvd_library, U_S "libdvd_interface_2");
-+
-+    if(dlsym(libdvd_library, U_S "libdvd_crack")) {
-       fprintf(stderr,
--      "libdvdread: Old (pre-0.0.2) version of libdvdcss found.\n"
-+      "libdvdread: Old (pre-0.0.2) version of libdvd found.\n"
-      "libdvdread: You should get the latest version from "
-      "http://www.videolan.org/\n" );
--      dlclose(dvdcss_library);
--      dvdcss_library = NULL;
--    } else if(!DVDcss_open  || !DVDcss_close || !DVDcss_title || !DVDcss_seek
--      || !DVDcss_read || !DVDcss_error || !dvdcss_version) {
--      fprintf(stderr,  "libdvdread: Missing symbols in libdvdcss.so.2, "
-+      dlclose(libdvd_library);
-+      libdvd_library = NULL;
-+    } else if(!DVD_open  || !DVD_close || !DVD_title || !DVD_seek
-+      || !DVD_read || !DVD_error || !libdvd_version) {
-+      fprintf(stderr,  "libdvdread: Missing symbols in libdvd.so.0, "
-      "this shouldn't happen !\n");
--      dlclose(dvdcss_library);
-+      dlclose(libdvd_library);
-     }
-   }
- #endif /* HAVE_DVDCSS_DVDCSS_H */
-  
--  if(dvdcss_library != NULL) {
-+  if(libdvd_library != NULL) {
-     /*
-     char *psz_method = getenv( "DVDCSS_METHOD" );
-     char *psz_verbose = getenv( "DVDCSS_VERBOSE" );
-     fprintf(stderr, "DVDCSS_METHOD %s\n", psz_method);
-     fprintf(stderr, "DVDCSS_VERBOSE %s\n", psz_verbose);
-     */
--    fprintf(stderr, "libdvdread: Using libdvdcss version %s for DVD access\n",
--    *dvdcss_version);
-+    fprintf(stderr, "libdvdread: Using libdvd version %s for DVD access\n",
-+    *libdvd_version);
-    
-     /* libdvdcss wrapper functions */
--    dvdinput_open  = css_open;
--    dvdinput_close = css_close;
--    dvdinput_seek  = css_seek;
--    dvdinput_title = css_title;
--    dvdinput_read  = css_read;
--    dvdinput_error = css_error;
-+    dvdinput_open  = libdvd_open;
-+    dvdinput_close = libdvd_close;
-+    dvdinput_seek  = libdvd_seek;
-+    dvdinput_title = libdvd_title;
-+    dvdinput_read  = libdvd_read;
-+    dvdinput_error = libdvd_error;
-     return 1;
-    
-   } else {
-     fprintf(stderr, "libdvdread: Encrypted DVD support unavailable.\n");
-
--    /* libdvdcss replacement functions */
-+    /* libdvd replacement functions */
-     dvdinput_open  = file_open;
-     dvdinput_close = file_close;
-     dvdinput_seek  = file_seek;
Index: patches/patch-src_dvdread_dvd_reader_c
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/patches/patch-src_dvdread_dvd_reader_c,v
retrieving revision 1.1
diff -N -u -p patches/patch-src_dvdread_dvd_reader_c
--- patches/patch-src_dvdread_dvd_reader_c 3 Nov 2005 04:25:08 -0000 1.1
+++ /dev/null 9 Jul 2009 15:31:01 -0000
@@ -1,121 +0,0 @@
-$OpenBSD: patch-src_dvdread_dvd_reader_c,v 1.1 2005/11/03 04:25:08 jolan Exp $
---- src/dvdread/dvd_reader.c.orig Thu Sep 30 21:39:11 2004
-+++ src/dvdread/dvd_reader.c Sun Oct 10 21:53:17 2004
-@@ -170,9 +170,9 @@ static int initAllCSSKeys( dvd_reader_t
-     for( title = 0; title < 100; title++ ) {
- gettimeofday( &t_s, NULL );
- if( title == 0 ) {
--    sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
-+    snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.VOB" );
- } else {
--    sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
-+    snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, 0 );
- }
- start = UDFFindFile( dvd, filename, &len );
- if( start != 0 && len != 0 ) {
-@@ -190,7 +190,7 @@ static int initAllCSSKeys( dvd_reader_t
- if( title == 0 ) continue;
-    
- gettimeofday( &t_s, NULL );
-- sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
-+ snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, 1 );
- start = UDFFindFile( dvd, filename, &len );
- if( start == 0 || len == 0 ) break;
-    
-@@ -583,7 +583,7 @@ static int findDirFile( const char *path
-
-     while( ( ent = readdir( dir ) ) != NULL ) {
-         if( !strcasecmp( ent->d_name, file ) ) {
--            sprintf( filename, "%s%s%s", path,
-+            snprintf( filename, MAX_UDF_FILE_NAME_LEN, "%s%s%s", path,
-                      ( ( path[ strlen( path ) - 1 ] == '/' ) ? "" : "/" ),
-                      ent->d_name );
-             return 0;
-@@ -609,11 +609,11 @@ static int findDVDFile( dvd_reader_t *dv
-     ret = findDirFile( dvd->path_root, nodirfile, filename );
-     if( ret < 0 ) {
-         /* Try also with adding the path, just in case. */
--        sprintf( video_path, "%s/VIDEO_TS/", dvd->path_root );
-+        snprintf( video_path, sizeof(video_path), "%s/VIDEO_TS/", dvd->path_root );
-         ret = findDirFile( video_path, nodirfile, filename );
-         if( ret < 0 ) {
-             /* Try with the path, but in lower case. */
--            sprintf( video_path, "%s/video_ts/", dvd->path_root );
-+            snprintf( video_path, sizeof(video_path), "%s/video_ts/", dvd->path_root );
-             ret = findDirFile( video_path, nodirfile, filename );
-             if( ret < 0 ) {
-                 return 0;
-@@ -677,9 +677,9 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_re
-     dvd_file_t *dvd_file;
-
-     if( title == 0 ) {
--        sprintf( filename, "/VIDEO_TS/VIDEO_TS.VOB" );
-+        snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.VOB" );
-     } else {
--        sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
-+        snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, menu ? 0 : 1 );
-     }
-     start = UDFFindFile( dvd, filename, &len );
-     if( start == 0 ) return 0;
-@@ -699,7 +699,7 @@ static dvd_file_t *DVDOpenVOBUDF( dvd_re
-         int cur;
-
-         for( cur = 2; cur < 10; cur++ ) {
--            sprintf( filename, "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
-+            snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02d_%d.VOB", title, cur );
-             if( !UDFFindFile( dvd, filename, &len ) ) break;
-             dvd_file->filesize += len / DVD_VIDEO_LB_LEN;
-         }
-@@ -741,9 +741,9 @@ static dvd_file_t *DVDOpenVOBPath( dvd_r
-         dvd_input_t dev;
-
-         if( title == 0 ) {
--            sprintf( filename, "VIDEO_TS.VOB" );
-+            snprintf( filename, sizeof(filename), "VIDEO_TS.VOB" );
-         } else {
--            sprintf( filename, "VTS_%02i_0.VOB", title );
-+            snprintf( filename, sizeof(filename), "VTS_%02i_0.VOB", title );
-         }
-         if( !findDVDFile( dvd, filename, full_path ) ) {
-             free( dvd_file );
-@@ -769,7 +769,7 @@ static dvd_file_t *DVDOpenVOBPath( dvd_r
-     } else {
-         for( i = 0; i < 9; ++i ) {
-
--            sprintf( filename, "VTS_%02i_%i.VOB", title, i + 1 );
-+            snprintf( filename, sizeof(filename), "VTS_%02i_%i.VOB", title, i + 1 );
-             if( !findDVDFile( dvd, filename, full_path ) ) {
-                 break;
-             }
-@@ -805,16 +805,16 @@ dvd_file_t *DVDOpenFile( dvd_reader_t *d
-     switch( domain ) {
-     case DVD_READ_INFO_FILE:
-         if( titlenum == 0 ) {
--            sprintf( filename, "/VIDEO_TS/VIDEO_TS.IFO" );
-+            snprintf( filename, sizeof(filename),"/VIDEO_TS/VIDEO_TS.IFO" );
-         } else {
--            sprintf( filename, "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
-+            snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02i_0.IFO", titlenum );
-         }
-         break;
-     case DVD_READ_INFO_BACKUP_FILE:
-         if( titlenum == 0 ) {
--            sprintf( filename, "/VIDEO_TS/VIDEO_TS.BUP" );
-+            snprintf( filename, sizeof(filename), "/VIDEO_TS/VIDEO_TS.BUP" );
-         } else {
--            sprintf( filename, "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
-+            snprintf( filename, sizeof(filename), "/VIDEO_TS/VTS_%02i_0.BUP", titlenum );
-         }
-         break;
-     case DVD_READ_MENU_VOBS:
-@@ -1098,8 +1098,8 @@ int DVDDiscID( dvd_reader_t *dvd, unsign
-    }
-    bytes_read = DVDReadBytes( dvd_file, buffer, file_size );
-    if( bytes_read != file_size ) {
-- fprintf( stderr, "libdvdread: DVDDiscId read returned %zd bytes"
-- ", wanted %zd\n", bytes_read, file_size );
-+ fprintf( stderr, "libdvdread: DVDDiscId read returned %d bytes"
-+ ", wanted %d\n", bytes_read, file_size );
- DVDCloseFile( dvd_file );
- free( buffer_base );
- return -1;
Index: pkg/PFRAG.shared
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/pkg/PFRAG.shared,v
retrieving revision 1.4
diff -N -u -p pkg/PFRAG.shared
--- pkg/PFRAG.shared 28 Dec 2005 15:28:28 -0000 1.4
+++ pkg/PFRAG.shared 9 Jul 2009 15:44:05 -0000
@@ -1,2 +1,3 @@
 @comment $OpenBSD: PFRAG.shared,v 1.4 2005/12/28 15:28:28 jakemsr Exp $
 @lib lib/libdvdnav.so.${LIBdvdnav_VERSION}
+@lib lib/libdvdnavmini.so.${LIBdvdnavmini_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/multimedia/libdvdnav/pkg/PLIST,v
retrieving revision 1.3
diff -N -u -p pkg/PLIST
--- pkg/PLIST 3 Nov 2005 04:25:09 -0000 1.3
+++ pkg/PLIST 9 Jul 2009 15:44:05 -0000
@@ -2,18 +2,15 @@
 %%SHARED%%
 bin/dvdnav-config
 include/dvdnav/
-include/dvdnav/dvd_reader.h
 include/dvdnav/dvd_types.h
-include/dvdnav/dvd_udf.h
 include/dvdnav/dvdnav.h
 include/dvdnav/dvdnav_events.h
-include/dvdnav/ifo_print.h
-include/dvdnav/ifo_read.h
-include/dvdnav/ifo_types.h
-include/dvdnav/nav_print.h
-include/dvdnav/nav_read.h
-include/dvdnav/nav_types.h
 lib/libdvdnav.a
 lib/libdvdnav.la
+lib/libdvdnavmini.a
+lib/libdvdnavmini.la
+lib/pkgconfig/
+lib/pkgconfig/dvdnav.pc
+lib/pkgconfig/dvdnavmini.pc
 share/aclocal/
 share/aclocal/dvdnav.m4


Re: mplayer update effort

by j4nKy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:
> Hello,
>
> Our in tree version of MPlayer is ancient. I noticed this when trying
> smplayer last week and it told me so. I CC'd the maintainer of mplayer
> in and I have not heard anything, so I attempted to take an update on
> myself.

is anyone using bktr(4) support in mplayer?  it's kinda awkward and
confusing, as it does both video and audio in the same "driver",
even though bktr(4) does not have any audio interface ...

--
jakemsr@...
SDF Public Access UNIX System - http://sdf.lonestar.org


Re: mplayer update effort

by Edd Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 10, 2009 at 12:03:26AM +0000, Jacob Meuser wrote:
> is anyone using bktr(4) support in mplayer?  it's kinda awkward and
> confusing, as it does both video and audio in the same "driver",
> even though bktr(4) does not have any audio interface ...

I think this is unlikely.

This may explain why I had no sound using my bktr with some other app (I
forget the name).

--

Best Regards

Edd Barrett
(Freelance software developer / technical writer / open-source developer)

http://students.dec.bmth.ac.uk/ebarrett


Re: mplayer update effort

by Simon Bertrang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 10, 2009 at 12:03:26AM +0000, Jacob Meuser wrote:

> On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:
> > Hello,
> >
> > Our in tree version of MPlayer is ancient. I noticed this when trying
> > smplayer last week and it told me so. I CC'd the maintainer of mplayer
> > in and I have not heard anything, so I attempted to take an update on
> > myself.
>
> is anyone using bktr(4) support in mplayer?  it's kinda awkward and
> confusing, as it does both video and audio in the same "driver",
> even though bktr(4) does not have any audio interface ...
>

Well, at least there's
"Brooktree BT878 Audio" rev 0x02 at pci0 dev 8 function 1 not configured
...

We're using mplayer to watch TV but I wasn't able to look at the audio
part yet, but having support for it would be nice.  Currently the TV
card has it's own cable to the external mixer (hardware).

Regards,
Simon


Re: mplayer update effort

by Landry Breuil-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 10, 2009 at 07:27:03AM +0200, Simon Bertrang wrote:

> On Fri, Jul 10, 2009 at 12:03:26AM +0000, Jacob Meuser wrote:
> > On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:
> > > Hello,
> > >
> > > Our in tree version of MPlayer is ancient. I noticed this when trying
> > > smplayer last week and it told me so. I CC'd the maintainer of mplayer
> > > in and I have not heard anything, so I attempted to take an update on
> > > myself.
> >
> > is anyone using bktr(4) support in mplayer?  it's kinda awkward and
> > confusing, as it does both video and audio in the same "driver",
> > even though bktr(4) does not have any audio interface ...
> >
>
> Well, at least there's
> "Brooktree BT878 Audio" rev 0x02 at pci0 dev 8 function 1 not configured
> ...
>
> We're using mplayer to watch TV but I wasn't able to look at the audio
> part yet, but having support for it would be nice.  Currently the TV
> card has it's own cable to the external mixer (hardware).

Yep, i used it extensively with a
bktr0 at pci0 dev 4 function 0 "Brooktree BT848" rev 0x12: ivec 0x7d8
using mplayer -tv device=/dev/bktr0:driver=bsdbt848:input=1,audioid=1 tv://
to watch what was sent on composite input of the card. worked really
nice at that point... to bad bktr is only i386/amd64, i'd have like to
make it work on sparc64 (didnt test macppc yet).

Landry


Re: mplayer update effort

by j4nKy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jul 10, 2009 at 09:33:56AM +0200, Landry Breuil wrote:

> On Fri, Jul 10, 2009 at 07:27:03AM +0200, Simon Bertrang wrote:
> > On Fri, Jul 10, 2009 at 12:03:26AM +0000, Jacob Meuser wrote:
> > > On Thu, Jul 09, 2009 at 04:17:44PM +0100, Edd Barrett wrote:
> > > > Hello,
> > > >
> > > > Our in tree version of MPlayer is ancient. I noticed this when trying
> > > > smplayer last week and it told me so. I CC'd the maintainer of mplayer
> > > > in and I have not heard anything, so I attempted to take an update on
> > > > myself.
> > >
> > > is anyone using bktr(4) support in mplayer?  it's kinda awkward and
> > > confusing, as it does both video and audio in the same "driver",
> > > even though bktr(4) does not have any audio interface ...
> > >
> >
> > Well, at least there's
> > "Brooktree BT878 Audio" rev 0x02 at pci0 dev 8 function 1 not configured
> > ...
> >
> > We're using mplayer to watch TV but I wasn't able to look at the audio
> > part yet, but having support for it would be nice.  Currently the TV
> > card has it's own cable to the external mixer (hardware).
>
> Yep, i used it extensively with a
> bktr0 at pci0 dev 4 function 0 "Brooktree BT848" rev 0x12: ivec 0x7d8
> using mplayer -tv device=/dev/bktr0:driver=bsdbt848:input=1,audioid=1 tv://
> to watch what was sent on composite input of the card. worked really
> nice at that point... to bad bktr is only i386/amd64, i'd have like to
> make it work on sparc64 (didnt test macppc yet).

well, that doesn't really use the audio part of the bktr support in
mplayer.  it's only used for mencoder, when recording.  but, people
are obviously using the bktr support, so I guess I'll make it use
sndio instead of OSS.

--
jakemsr@...
SDF Public Access UNIX System - http://sdf.lonestar.org