aboutsummaryrefslogtreecommitdiffstats
path: root/meta-mentor-staging/recipes-multimedia/alsa/alsa-lib/plug_fix_rate_converter_config.patch
blob: 8ec789a0f0f287e10fff4bc8d9092e33f5eacfed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Upstream-Status: Pending

# Author: Andreas Pape <apape@de.adit-jv.com>
# Date:   Tue Feb 4 10:00:00 2014
# pcm plug: save converter config.
#
# Passed config is freed after call to open, thus it is invalid when trying to extract the converter name.
# This patch copies the config entry for later usage.
#

Index: alsa-lib-1.1.4.1/src/pcm/pcm_plug.c
===================================================================
--- alsa-lib-1.1.4.1.orig/src/pcm/pcm_plug.c	2017-06-30 02:06:01.200623861 +0500
+++ alsa-lib-1.1.4.1/src/pcm/pcm_plug.c	2017-06-30 02:06:01.196623861 +0500
@@ -1122,6 +1122,8 @@
 	
 	err = snd_pcm_new(&pcm, SND_PCM_TYPE_PLUG, name, slave->stream, slave->mode);
 	if (err < 0) {
+		if (plug->rate_converter)
+			snd_config_delete((snd_config_t*)plug->rate_converter);
 		free(plug);
 		return err;
 	}