summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gst/inter/gstinteraudiosink.c9
-rw-r--r--gst/inter/gstinteraudiosrc.c6
2 files changed, 8 insertions, 7 deletions
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c
index c4ddf7677..11ce1bfd8 100644
--- a/gst/inter/gstinteraudiosink.c
+++ b/gst/inter/gstinteraudiosink.c
@@ -332,10 +332,11 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
g_mutex_lock (interaudiosink->surface->mutex);
n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4;
- if (n > (800 * 2 * 2)) {
- GST_INFO ("flushing 800 samples");
- gst_adapter_flush (interaudiosink->surface->audio_adapter, 800 * 4);
- n -= 800;
+#define SIZE 1600
+ if (n > (1600 * 3)) {
+ GST_WARNING ("flushing 800 samples");
+ gst_adapter_flush (interaudiosink->surface->audio_adapter, (SIZE / 2) * 4);
+ n -= (SIZE / 2);
}
gst_adapter_push (interaudiosink->surface->audio_adapter,
gst_buffer_ref (buffer));
diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c
index eccc748fa..3e64eefc9 100644
--- a/gst/inter/gstinteraudiosrc.c
+++ b/gst/inter/gstinteraudiosrc.c
@@ -393,8 +393,8 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
g_mutex_lock (interaudiosrc->surface->mutex);
n = gst_adapter_available (interaudiosrc->surface->audio_adapter) / 4;
- if (n > SIZE * 2) {
- GST_DEBUG ("flushing %d samples", SIZE / 2);
+ if (n > SIZE * 3) {
+ GST_WARNING ("flushing %d samples", SIZE / 2);
gst_adapter_flush (interaudiosrc->surface->audio_adapter, (SIZE / 2) * 4);
n -= (SIZE / 2);
}
@@ -409,7 +409,7 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
if (n < SIZE) {
GstBuffer *newbuf = gst_buffer_new_and_alloc (SIZE * 4);
- GST_DEBUG ("creating %d samples of silence", SIZE - n);
+ GST_WARNING ("creating %d samples of silence", SIZE - n);
memset (GST_BUFFER_DATA (newbuf) + n * 4, 0, SIZE * 4 - n * 4);
if (buffer) {
memcpy (GST_BUFFER_DATA (newbuf), GST_BUFFER_DATA (buffer), n * 4);