From dab83dc1f05b8aac70514da1e663c09c9ff6b3a2 Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 16 Oct 2005 21:29:30 +0000 Subject: [PATCH] continue gracefully if we don't manage to find an audio stream in some cases. --- x11/mplayer/Makefile | 4 ++-- x11/mplayer/patches/patch-libmpcodecs_ad_pcm_c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/x11/mplayer/Makefile b/x11/mplayer/Makefile index dd06854d19b..ea7bf6613a8 100644 --- a/x11/mplayer/Makefile +++ b/x11/mplayer/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.93 2005/10/10 15:37:24 espie Exp $ +# $OpenBSD: Makefile,v 1.94 2005/10/16 21:29:30 espie Exp $ # May not be hard to add more. ONLY_FOR_ARCHS= amd64 i386 powerpc sparc64 arm @@ -7,7 +7,7 @@ COMMENT= "Movie player supporting MPEG, DivX, AVI, ASF, MOV & more" DISTNAME= MPlayer-1.0pre7 DIST_SUBDIR= mplayer -PKGNAME= ${DISTNAME:L}p10 +PKGNAME= ${DISTNAME:L}p11 CATEGORIES= x11 EXTRACT_SUFX= .tar.bz2 diff --git a/x11/mplayer/patches/patch-libmpcodecs_ad_pcm_c b/x11/mplayer/patches/patch-libmpcodecs_ad_pcm_c index b85129e722e..4be565b4b2a 100644 --- a/x11/mplayer/patches/patch-libmpcodecs_ad_pcm_c +++ b/x11/mplayer/patches/patch-libmpcodecs_ad_pcm_c @@ -1,7 +1,16 @@ -$OpenBSD: patch-libmpcodecs_ad_pcm_c,v 1.1 2005/08/29 06:53:54 biorn Exp $ +$OpenBSD: patch-libmpcodecs_ad_pcm_c,v 1.2 2005/10/16 21:29:30 espie Exp $ --- libmpcodecs/ad_pcm.c.orig Sun Feb 27 00:02:09 2005 -+++ libmpcodecs/ad_pcm.c Sat Aug 27 23:38:30 2005 -@@ -96,8 +96,8 @@ static int control(sh_audio_t *sh,int cm ++++ libmpcodecs/ad_pcm.c Sun Oct 16 23:23:48 2005 +@@ -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; +@@ -96,8 +98,8 @@ static int control(sh_audio_t *sh,int cm static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen) {