Received: by mail.netbsd.org (Postfix, from userid 605) id CFCF684D64; Tue, 23 Oct 2018 13:08:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D287E84D6B for ; Tue, 23 Oct 2018 13:08:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id I0NAtUSxWQuQ for ; Tue, 23 Oct 2018 13:08:40 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 10E9C84D45 for ; Tue, 23 Oct 2018 13:08:40 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 05D49FBEE; Tue, 23 Oct 2018 13:08:40 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1540300120164980" MIME-Version: 1.0 Date: Tue, 23 Oct 2018 13:08:40 +0000 From: "Leonardo Taccari" Subject: CVS commit: pkgsrc/multimedia/mpv To: pkgsrc-changes@NetBSD.org Reply-To: leot@netbsd.org X-Mailer: log_accum Message-Id: <20181023130840.05D49FBEE@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1540300120164980 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: leot Date: Tue Oct 23 13:08:39 UTC 2018 Modified Files: pkgsrc/multimedia/mpv: distinfo pkgsrc/multimedia/mpv/patches: patch-audio_out_ao__oss.c Log Message: mpv: Do not force files with multiple audio channels to stereo With the previous version all files with >2 audio channels and an audio device that supported them actually fall back inconditionally to stereo channel. (Hopefully now the logic to gracefully handle audio channels should work, sorry again for the noise!) To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 pkgsrc/multimedia/mpv/distinfo cvs rdiff -u -r1.8 -r1.9 \ pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1540300120164980 Content-Disposition: inline Content-Length: 2847 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/multimedia/mpv/distinfo diff -u pkgsrc/multimedia/mpv/distinfo:1.45 pkgsrc/multimedia/mpv/distinfo:1.46 --- pkgsrc/multimedia/mpv/distinfo:1.45 Tue Oct 23 12:39:35 2018 +++ pkgsrc/multimedia/mpv/distinfo Tue Oct 23 13:08:39 2018 @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.45 2018/10/23 12:39:35 leot Exp $ +$NetBSD: distinfo,v 1.46 2018/10/23 13:08:39 leot Exp $ SHA1 (mpv-0.29.1.tar.gz) = 83f2bc0eb5a8bec9a9d5efc7de0e19a442238ac5 RMD160 (mpv-0.29.1.tar.gz) = 72a4fda3a72ac4fd37ed04435833fa2cf378a012 SHA512 (mpv-0.29.1.tar.gz) = ec57c9ceaaf2915ee237dd5a1c5ea5d22725d8611e28a9b998e5bb0d8ab5bdf3631d0267fc7b54da31cb1eaa145ef35841e68846bd41c3b9e1024902e92fd086 Size (mpv-0.29.1.tar.gz) = 3059503 bytes -SHA1 (patch-audio_out_ao__oss.c) = b07972345960e4024ad7f48b166b4ebd81cb0758 +SHA1 (patch-audio_out_ao__oss.c) = 5bc2d81523876b31b226081868117a833c9e2f14 SHA1 (patch-player_main.c) = e794199990059cc95050032194bca70557c381d7 Index: pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c diff -u pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c:1.8 pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c:1.9 --- pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c:1.8 Tue Oct 23 12:39:35 2018 +++ pkgsrc/multimedia/mpv/patches/patch-audio_out_ao__oss.c Tue Oct 23 13:08:39 2018 @@ -1,4 +1,4 @@ -$NetBSD: patch-audio_out_ao__oss.c,v 1.8 2018/10/23 12:39:35 leot Exp $ +$NetBSD: patch-audio_out_ao__oss.c,v 1.9 2018/10/23 13:08:39 leot Exp $ - ioctl(..., SNDCTL_DSP_CHANNELS, &nchannels) for not supported nchannels does not return an error and instead set nchannels to the default value. Instead of @@ -6,7 +6,7 @@ $NetBSD: patch-audio_out_ao__oss.c,v 1.8 --- audio/out/ao_oss.c.orig 2018-10-02 19:03:41.000000000 +0000 +++ audio/out/ao_oss.c -@@ -336,19 +336,24 @@ static int reopen_device(struct ao *ao, +@@ -336,19 +336,23 @@ static int reopen_device(struct ao *ao, mp_chmap_sel_add_map(&sel, &oss_layouts[n]); if (!ao_chmap_sel_adjust(ao, &sel, &channels)) goto fail; @@ -24,16 +24,15 @@ $NetBSD: patch-audio_out_ao__oss.c,v 1.8 reqchannels); goto fail; } -+ goto stereo; - } else { -- int c = reqchannels - 1; -+stereo: + if (nchannels != reqchannels) { + // Fallback to stereo -+ c = 1; -+ } else { -+ c = reqchannels - 1; ++ nchannels = 2; ++ goto stereo; + } + } else { +- int c = reqchannels - 1; ++stereo: ++ c = nchannels - 1; if (ioctl(p->audio_fd, SNDCTL_DSP_STEREO, &c) == -1) { MP_ERR(ao, "Failed to set audio device to %d channels.\n", reqchannels); --_----------=_1540300120164980--