Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #1 from adenexter/jb17654
baseaudiosink: Resync when ringbuffer resets
  • Loading branch information
stskeeps committed May 16, 2014
2 parents 8daf4ab + bb14a34 commit 6b7bf9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gst-plugins-base/gst-libs/gst/audio/gstbaseaudiosink.c
Expand Up @@ -921,6 +921,12 @@ gst_base_audio_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
if (!gst_ring_buffer_acquire (sink->ringbuffer, spec))
goto acquire_error;

/* We need to resync since the ringbuffer restarted */
sink->priv->avg_skew = -1;
sink->next_sample = -1;
sink->priv->eos_time = -1;
sink->priv->discont_time = -1;

if (bsink->pad_mode == GST_ACTIVATE_PUSH) {
GST_DEBUG_OBJECT (sink, "activate ringbuffer");
gst_ring_buffer_activate (sink->ringbuffer, TRUE);
Expand Down

0 comments on commit 6b7bf9d

Please sign in to comment.