From d627f060307c3d6c7d0cabb6f4d66c10f87da214 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Mon, 21 Nov 2011 09:46:49 +0100 Subject: Use sizeof in encode_varint call for buffer size --- src/audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); -- cgit