flvdemux: Restrict resyncing to TS regressions

The behavior of resyncing video and audio indepen-
dently can cause A/V desyncs. Lets restrict resyncs
to jumps backward for now.

https://bugzilla.gnome.org/show_bug.cgi?id=736397
This commit is contained in:
Jan Alexander Steffens (heftig) 2014-11-19 16:12:38 +01:00 committed by Nicolas Dufresne
parent 0053ad0847
commit bf73d834b2

View file

@ -894,7 +894,7 @@ gst_flv_demux_update_resync (GstFlvDemux * demux, guint32 dts, gboolean discont,
{
gboolean ret = FALSE;
gint32 ddts = dts - *last;
if (!discont && ABS (ddts) >= RESYNC_THRESHOLD) {
if (!discont && ddts <= -RESYNC_THRESHOLD) {
/* Theoretically, we should use substract the duration of the last buffer,
but this demuxer sends no durations on buffers, not sure if it cannot
know, or just does not care to calculate. */