summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-11-21 09:46:49 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-10 09:17:33 +0100
commitd627f060307c3d6c7d0cabb6f4d66c10f87da214 (patch)
tree8ee61966a23bdb48d4ef82cb44cbaffd92b8c7d3 /src
parentaf77c11424193eaaf7cb56b5c94b303fcf692599 (diff)
downloadcmumble-d627f060307c3d6c7d0cabb6f4d66c10f87da214.tar.gz
cmumble-d627f060307c3d6c7d0cabb6f4d66c10f87da214.tar.bz2
cmumble-d627f060307c3d6c7d0cabb6f4d66c10f87da214.zip
Use sizeof in encode_varint call for buffer size
Diffstat (limited to 'src')
-rw-r--r--src/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio.c b/src/audio.c
index a83471d..3096edf 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -45,7 +45,7 @@ pull_buffer(GstAppSink *sink, gpointer user_data)
data[pos++] = (udp_voice_celt_alpha << 5) | (udp_normal_talking);
- encode_varint(&data[pos], &write, ++cm->sequence, 1024-pos);
+ encode_varint(&data[pos], &write, ++cm->sequence, sizeof(data)-pos);
pos += write;
data[pos++] = 0x00 /*: 0x80 */ | (GST_BUFFER_SIZE(buf) & 0x7F);