Commit efb74ca0 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

interaudiosink: Make sure that buffer time is always bigger than period time

parent e734c3cf
......@@ -300,6 +300,16 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
buffer_time = interaudiosink->surface->audio_buffer_time;
period_time = interaudiosink->surface->audio_period_time;
if (buffer_time < period_time) {
GST_ERROR_OBJECT (interaudiosink,
"Buffer time smaller than period time (%" GST_TIME_FORMAT " < %"
GST_TIME_FORMAT ")", GST_TIME_ARGS (buffer_time),
GST_TIME_ARGS (period_time));
g_mutex_unlock (&interaudiosink->surface->mutex);
return GST_FLOW_ERROR;
}
buffer_samples =
gst_util_uint64_scale (buffer_time, interaudiosink->info.rate,
GST_SECOND);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment