audiobasesink: handle the RESYNC flag

Also resync when a buffer with the RESYNC flag is seen.
This commit is contained in:
Wim Taymans 2013-12-05 16:17:22 +01:00
parent e68317f070
commit df3718ea2b

View file

@ -1858,8 +1858,9 @@ gst_audio_base_sink_render (GstBaseSink * bsink, GstBuffer * buf)
} }
/* always resync after a discont */ /* always resync after a discont */
if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT))) { if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DISCONT) ||
GST_DEBUG_OBJECT (sink, "resync after discont"); GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_RESYNC))) {
GST_DEBUG_OBJECT (sink, "resync after discont/resync");
goto no_align; goto no_align;
} }