amcvideodec: pass the correct time value to wait_for_sync

When we are not waiting, we need to pass -1 to signal that we just want to check
that the frame was/n't rendered.  Avoids waiting for frames that will never be
rendered.

https://bugzilla.gnome.org/show_bug.cgi?id=761014
This commit is contained in:
Matthew Waters 2016-02-04 15:11:15 +11:00
parent 3c29dcaddb
commit 9efdfb1a29

View file

@ -1101,7 +1101,7 @@ _amc_gl_iterate_queue_unlocked (GstGLSyncMeta * sync_meta, gboolean wait)
/* Frames are currently pushed in order and waits need to be performed
* in the same order */
end_time = 30 * G_TIME_SPAN_MILLISECOND + tmp->released_ts;
end_time = wait ? 30 * G_TIME_SPAN_MILLISECOND + tmp->released_ts : -1;
if (!_amc_gl_possibly_wait_for_gl_sync (tmp, end_time))
ret = FALSE;