Prevent successive orientation changes from moving the clip backwards in time due to gst-nanos / java-millis rounding errors plus seeking to keyframes.

This commit is contained in:
Xavi Artigas 2012-09-17 18:24:00 +02:00
parent 44a46337d7
commit 803622382e

View file

@ -83,7 +83,7 @@ public class Tutorial1 extends Activity implements SurfaceHolder.Callback, OnSee
playing = savedInstanceState.getBoolean("playing"); playing = savedInstanceState.getBoolean("playing");
int milliseconds = savedInstanceState.getInt("position"); int milliseconds = savedInstanceState.getInt("position");
Log.i ("GStreamer", "Restoring state, playing:" + playing + " position:" + milliseconds + " ms."); Log.i ("GStreamer", "Restoring state, playing:" + playing + " position:" + milliseconds + " ms.");
nativeSetPosition(milliseconds); nativeSetPosition(milliseconds + 1);
if (playing) { if (playing) {
nativePlay(); nativePlay();
} }