audiodecoder: use segment start as fallback ts if no other available

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=709965
This commit is contained in:
Mark Nauwelaerts 2013-12-02 20:35:04 +01:00
parent 5218956e8b
commit 387e5f0c14

View file

@ -1101,6 +1101,11 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf,
GST_DEBUG_OBJECT (dec, "base_ts now %" GST_TIME_FORMAT, GST_TIME_ARGS (ts)); GST_DEBUG_OBJECT (dec, "base_ts now %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
} }
/* still no valid ts, track the segment one */
if (G_UNLIKELY (!GST_CLOCK_TIME_IS_VALID (priv->base_ts))) {
priv->base_ts = dec->output_segment.start;
}
/* slightly convoluted approach caters for perfect ts if subclass desires */ /* slightly convoluted approach caters for perfect ts if subclass desires */
if (GST_CLOCK_TIME_IS_VALID (ts)) { if (GST_CLOCK_TIME_IS_VALID (ts)) {
if (dec->priv->tolerance > 0) { if (dec->priv->tolerance > 0) {