diff options
author | toshii <toshii@pkgsrc.org> | 2000-09-01 15:58:36 +0000 |
---|---|---|
committer | toshii <toshii@pkgsrc.org> | 2000-09-01 15:58:36 +0000 |
commit | 3e7d8d602f7a806109f62bca19fe56c04c31888d (patch) | |
tree | f796ba1abaa467798d100a7512fc614075772bcf /audio/gqmpeg/patches | |
parent | b6bc871edfab58e8d02784f100d1bc476e51de07 (diff) | |
download | pkgsrc-3e7d8d602f7a806109f62bca19fe56c04c31888d.tar.gz |
Make sure if mixer_devinfo's mixer_class points to a valid index.
(This doesn't hold for uaudio(4), which caused SEGV on startup.)
Diffstat (limited to 'audio/gqmpeg/patches')
-rw-r--r-- | audio/gqmpeg/patches/patch-ab | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/audio/gqmpeg/patches/patch-ab b/audio/gqmpeg/patches/patch-ab index 2f360ef4593..8e0650e9e37 100644 --- a/audio/gqmpeg/patches/patch-ab +++ b/audio/gqmpeg/patches/patch-ab @@ -1,7 +1,7 @@ -$NetBSD: patch-ab,v 1.11 2000/08/26 16:41:49 wiz Exp $ +$NetBSD: patch-ab,v 1.12 2000/09/01 15:58:37 toshii Exp $ ---- src/mixer.c.orig Mon Jul 24 00:25:50 2000 -+++ src/mixer.c +--- src/mixer.c.orig Mon Jul 24 07:25:50 2000 ++++ src/mixer.c Fri Sep 1 21:42:16 2000 @@ -265,6 +265,17 @@ mixer_devinfo_t *infos; mixer_ctrl_t *values; @@ -20,14 +20,17 @@ $NetBSD: patch-ab,v 1.11 2000/08/26 16:41:49 wiz Exp $ void mixer_init(gint init_device_id) { int fd, i, ndev; -@@ -306,7 +317,9 @@ +@@ -306,7 +317,12 @@ if (infos[i].type == AUDIO_MIXER_VALUE) { DeviceData *device = g_new0(DeviceData, 1); device->device_id = i; - device->device_name = infos[i].label.name; -+ device->device_name = -+ catstr(infos[infos[i].mixer_class].label.name, -+ infos[i].label.name); ++ if (0 <= infos[i].mixer_class && infos[i].mixer_class < ndev) ++ device->device_name = ++ catstr(infos[infos[i].mixer_class].label.name, ++ infos[i].label.name); ++ else ++ device->device_name = infos[i].label.name; device->stereo = 1; device->recordable = 0; device_list = g_list_append(device_list, device); |