File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
app/src/main/java/protect/videotranscoder/activity Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -331,11 +331,12 @@ private void startEncode()
331331 }
332332
333333 int endTimeSec = rangeSeekBar .getSelectedMaxValue ().intValue ();
334+ int durationSec = endTimeSec - startTimeSec ;
334335 if ( (videoInfo .durationMs )/1000 != endTimeSec )
335336 {
336337 // Duration of media file
337338 command .add ("-t" );
338- command .add (Integer .toString (endTimeSec - startTimeSec ));
339+ command .add (Integer .toString (durationSec ));
339340 }
340341
341342 if (container .supportedVideoCodecs .size () > 0 )
@@ -389,7 +390,7 @@ private void startEncode()
389390 // Output file
390391 command .add (destination .getAbsolutePath ());
391392
392- FFmpegResponseHandler handler = new FFmpegResponseHandler (videoInfo . durationMs , progressBar , _transcodeResultHandler );
393+ FFmpegResponseHandler handler = new FFmpegResponseHandler (durationSec * 1000 , progressBar , _transcodeResultHandler );
393394 FFmpegUtil .call (command .toArray (new String [command .size ()]), handler );
394395
395396 stopVideoPlayback ();
You can’t perform that action at this time.
0 commit comments