Skip to content

Commit 34009b2

Browse files
committed
fixed MOV duration
1 parent 9ef3a7f commit 34009b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/src/main/java/poly/darkdepths/strongbox/CameraFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ public void run ()
414414
if (mFrameQ.peek() != null)
415415
{
416416
VideoFrame vf = mFrameQ.pop();
417-
muxer.addFrame(mLastWidth/2, mLastHeight/2, ByteBuffer.wrap(vf.image),vf.fps,vf.duration);
417+
muxer.addFrame(mLastWidth/2, mLastHeight/2, ByteBuffer.wrap(vf.image),benchmarkFPS,vf.duration);
418418
}
419419
}
420420

app/src/main/java/poly/darkdepths/strongbox/encoders/ImageToMJPEGMOVMuxer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void addFrame(int width, int height, ByteBuffer buff, long timeScaleFPS,
5858
audioTrack.addSampleEntry(MP4Muxer.audioSampleEntry(af));
5959
}
6060
// Add packet to video track
61-
videoTrack.addFrame(new MP4Packet(buff, frameNo, timeScaleFPS, duration, frameNo, true, null, frameNo, 0));
61+
videoTrack.addFrame(new MP4Packet(buff, frameNo, timeScaleFPS, 1, frameNo, true, null, frameNo, 0));
6262
frameNo++;
6363
}
6464
public void addAudio (ByteBuffer buffer) throws IOException

0 commit comments

Comments
 (0)