[pulseaudio-discuss] [PATCH] Hardcode FRAME_SIZE_MAX_ALLOW
Maarten Bosmans
mkbosmans at gmail.com
Tue Nov 22 07:09:18 PST 2011
Instead of using PA_SCACHE_ENTRY_SIZE_MAX, the size for FRAME_SIZE_MAX_ALLOW is
set directly to the same value. This removes the need for the core-scache.h
include, which caused an unwanted dependency of libpulsecommon on libpulsecore.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41539
---
src/pulsecore/pstream.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/pulsecore/pstream.c b/src/pulsecore/pstream.c
index 3e59fc4..b08f6a6 100644
--- a/src/pulsecore/pstream.c
+++ b/src/pulsecore/pstream.c
@@ -37,7 +37,6 @@
#include <pulsecore/socket.h>
#include <pulsecore/queue.h>
#include <pulsecore/log.h>
-#include <pulsecore/core-scache.h>
#include <pulsecore/creds.h>
#include <pulsecore/refcnt.h>
#include <pulsecore/flist.h>
@@ -74,7 +73,11 @@ enum {
typedef uint32_t pa_pstream_descriptor[PA_PSTREAM_DESCRIPTOR_MAX];
#define PA_PSTREAM_DESCRIPTOR_SIZE (PA_PSTREAM_DESCRIPTOR_MAX*sizeof(uint32_t))
-#define FRAME_SIZE_MAX_ALLOW PA_SCACHE_ENTRY_SIZE_MAX /* allow uploading a single sample in one frame at max */
+
+/* To allow uploading a single sample in one frame, this value should be the
+ * same size (16 MB) as PA_SCACHE_ENTRY_SIZE_MAX from pulsecore/core-scache.h.
+ */
+#define FRAME_SIZE_MAX_ALLOW (1024*1024*16)
PA_STATIC_FLIST_DECLARE(items, 0, pa_xfree);
--
1.7.4.1
More information about the pulseaudio-discuss
mailing list