diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-03 19:26:56 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-03 19:26:56 +0000 |
commit | 24291aff27c671c11619684cb10d3b36fdf87c0d (patch) | |
tree | 25f5c7493a58b6d48b51fb1b9843fb39bbb77b8b /polyp/pstream.c | |
parent | e10b918009446186c80584273d2e3f5e84a6670b (diff) |
sample cache work
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@102 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/pstream.c')
-rw-r--r-- | polyp/pstream.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/polyp/pstream.c b/polyp/pstream.c index 3076b776..7d576a16 100644 --- a/polyp/pstream.c +++ b/polyp/pstream.c @@ -23,6 +23,7 @@ #include <config.h> #endif +#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <netinet/in.h> @@ -40,7 +41,7 @@ enum pa_pstream_descriptor_index { 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 (1024*64) +#define FRAME_SIZE_MAX (1024*500) /* half a megabyte */ struct item_info { enum { PA_PSTREAM_ITEM_PACKET, PA_PSTREAM_ITEM_MEMBLOCK } type; @@ -361,8 +362,10 @@ static void do_read(struct pa_pstream *p) { /* Reading of frame descriptor complete */ /* Frame size too large */ - if (ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) > FRAME_SIZE_MAX) + if (ntohl(p->read.descriptor[PA_PSTREAM_DESCRIPTOR_LENGTH]) > FRAME_SIZE_MAX) { + fprintf(stderr, "frame size too large\n"); goto die; + } assert(!p->read.packet && !p->read.memblock); |