mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
baseaudiodecoder: minor fix in ts resync
This commit is contained in:
parent
d46006b198
commit
6c04035eec
1 changed files with 32 additions and 31 deletions
|
@ -732,6 +732,9 @@ gst_base_audio_decoder_finish_frame (GstBaseAudioDecoder * dec, GstBuffer * buf,
|
|||
GST_DEBUG_OBJECT (dec, "base_ts now %" GST_TIME_FORMAT, GST_TIME_ARGS (ts));
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (!buf))
|
||||
goto exit;
|
||||
|
||||
/* slightly convoluted approach caters for perfect ts if subclass desires */
|
||||
if (GST_CLOCK_TIME_IS_VALID (ts)) {
|
||||
if (dec->tolerance > 0) {
|
||||
|
@ -744,7 +747,7 @@ gst_base_audio_decoder_finish_frame (GstBaseAudioDecoder * dec, GstBuffer * buf,
|
|||
" samples past base_ts %" GST_TIME_FORMAT
|
||||
", expected ts %" GST_TIME_FORMAT, samples,
|
||||
GST_TIME_ARGS (priv->base_ts), GST_TIME_ARGS (next_ts));
|
||||
diff = GST_CLOCK_DIFF (next_ts, GST_BUFFER_TIMESTAMP (buf));
|
||||
diff = GST_CLOCK_DIFF (next_ts, ts);
|
||||
GST_LOG_OBJECT (dec, "ts diff %d ms", (gint) (diff / GST_MSECOND));
|
||||
/* if within tolerance,
|
||||
* discard buffer ts and carry on producing perfect stream,
|
||||
|
@ -761,8 +764,6 @@ gst_base_audio_decoder_finish_frame (GstBaseAudioDecoder * dec, GstBuffer * buf,
|
|||
}
|
||||
}
|
||||
|
||||
if (G_LIKELY (buf)) {
|
||||
|
||||
/* delayed one-shot stuff until confirmed data */
|
||||
if (priv->taglist) {
|
||||
GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, priv->taglist);
|
||||
|
@ -793,8 +794,8 @@ gst_base_audio_decoder_finish_frame (GstBaseAudioDecoder * dec, GstBuffer * buf,
|
|||
/* we got data, so note things are looking up */
|
||||
if (G_UNLIKELY (dec->priv->error_count))
|
||||
dec->priv->error_count--;
|
||||
}
|
||||
|
||||
exit:
|
||||
return gst_base_audio_decoder_output (dec, buf);
|
||||
|
||||
/* ERRORS */
|
||||
|
|
Loading…
Reference in a new issue