From 585a6c4addd2a1caf37f710256876cd524553f6a Mon Sep 17 00:00:00 2001 From: Vincent Penquerc'h Date: Fri, 27 Dec 2013 14:29:46 +0000 Subject: [PATCH] opusenc: increase max payload size to 4000 bytes 1275 is the maximum size of a frame, but the encoder may return up to 3 frames, and we need a few extra bytes for TOC, etc. We use 4000, which is a bit more, and suggested in the libopus docs. --- ext/opus/gstopusenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c index 9eefe9ca76..02190f9bd0 100644 --- a/ext/opus/gstopusenc.c +++ b/ext/opus/gstopusenc.c @@ -141,7 +141,7 @@ static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", #define DEFAULT_INBAND_FEC FALSE #define DEFAULT_DTX FALSE #define DEFAULT_PACKET_LOSS_PERCENT 0 -#define DEFAULT_MAX_PAYLOAD_SIZE 1024 +#define DEFAULT_MAX_PAYLOAD_SIZE 4000 enum { @@ -270,7 +270,7 @@ gst_opus_enc_class_init (GstOpusEncClass * klass) GST_PARAM_MUTABLE_PLAYING)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_PAYLOAD_SIZE, g_param_spec_uint ("max-payload-size", - "Max payload size", "Maximum payload size in bytes", 2, 1275, + "Max payload size", "Maximum payload size in bytes", 2, 4000, DEFAULT_MAX_PAYLOAD_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_MUTABLE_PLAYING));