gstaudiobasesink: Always reset last_align
authorReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Fri, 20 Dec 2013 21:06:25 +0000 (18:06 -0300)
committerReynaldo H. Verdejo Pinochet <r.verdejo@sisa.samsung.com>
Fri, 20 Dec 2013 21:06:25 +0000 (18:06 -0300)
Should be done for all the reset_sync() cases. Not
only for the READY to PAUSED one.

gst-libs/gst/audio/gstaudiobasesink.c

index c9b8ebb18a80a07476f270a5d12b1cf25a668272..52dd7ccb0df1c63c6dcd1fc6b2c5938765be2341 100644 (file)
@@ -963,6 +963,7 @@ gst_audio_base_sink_reset_sync (GstAudioBaseSink * sink)
   sink->priv->eos_time = -1;
   sink->priv->discont_time = -1;
   sink->priv->avg_skew = -1;
+  sink->priv->last_align = 0;
 }
 
 static void
@@ -2164,7 +2165,6 @@ gst_audio_base_sink_change_state (GstElement * element,
       break;
     case GST_STATE_CHANGE_READY_TO_PAUSED:
       gst_audio_base_sink_reset_sync (sink);
-      sink->priv->last_align = 0;
       gst_audio_ring_buffer_set_flushing (sink->ringbuffer, FALSE);
       gst_audio_ring_buffer_may_start (sink->ringbuffer, FALSE);