diff --git a/app/src/main/java/poly/darkdepths/strongbox/CameraFragment.java b/app/src/main/java/poly/darkdepths/strongbox/CameraFragment.java index 06257b4..6999261 100644 --- a/app/src/main/java/poly/darkdepths/strongbox/CameraFragment.java +++ b/app/src/main/java/poly/darkdepths/strongbox/CameraFragment.java @@ -414,7 +414,7 @@ public void run () if (mFrameQ.peek() != null) { VideoFrame vf = mFrameQ.pop(); - muxer.addFrame(mLastWidth/2, mLastHeight/2, ByteBuffer.wrap(vf.image),vf.fps,vf.duration); + muxer.addFrame(mLastWidth/2, mLastHeight/2, ByteBuffer.wrap(vf.image),benchmarkFPS,vf.duration); } } diff --git a/app/src/main/java/poly/darkdepths/strongbox/encoders/ImageToMJPEGMOVMuxer.java b/app/src/main/java/poly/darkdepths/strongbox/encoders/ImageToMJPEGMOVMuxer.java index 0444560..e482f74 100644 --- a/app/src/main/java/poly/darkdepths/strongbox/encoders/ImageToMJPEGMOVMuxer.java +++ b/app/src/main/java/poly/darkdepths/strongbox/encoders/ImageToMJPEGMOVMuxer.java @@ -58,7 +58,7 @@ public void addFrame(int width, int height, ByteBuffer buff, long timeScaleFPS, audioTrack.addSampleEntry(MP4Muxer.audioSampleEntry(af)); } // Add packet to video track - videoTrack.addFrame(new MP4Packet(buff, frameNo, timeScaleFPS, duration, frameNo, true, null, frameNo, 0)); + videoTrack.addFrame(new MP4Packet(buff, frameNo, timeScaleFPS, 1, frameNo, true, null, frameNo, 0)); frameNo++; } public void addAudio (ByteBuffer buffer) throws IOException