Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit d5e6a09

Browse files
committed
small API updates to use int instead of string
1 parent 9d5aaf3 commit d5e6a09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/org/ffmpeg/android/FfmpegController.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ public MediaDesc convertToMP4Stream (MediaDesc mediaIn, String outPath, ShellCal
571571
}
572572

573573

574-
public MediaDesc convertToWaveAudio (MediaDesc mediaIn, String outPath, String sampleRate, int channels, ShellCallback sc) throws Exception
574+
public MediaDesc convertToWaveAudio (MediaDesc mediaIn, String outPath, int sampleRate, int channels, ShellCallback sc) throws Exception
575575
{
576576
ArrayList<String> cmd = new ArrayList<String>();
577577

@@ -593,7 +593,7 @@ public MediaDesc convertToWaveAudio (MediaDesc mediaIn, String outPath, String s
593593
}
594594

595595
cmd.add("-ar");
596-
cmd.add(sampleRate);
596+
cmd.add(sampleRate + "");
597597

598598
cmd.add("-ac");
599599
cmd.add(channels + "");
@@ -766,7 +766,9 @@ public void concatAndTrimFilesMPEG (ArrayList<MediaDesc> videos,MediaDesc out, b
766766
cmd.add ("-vcodec");
767767
cmd.add("mpeg2video");
768768
*/
769-
//cmd.add("-an"); //no audio
769+
770+
if (out.audioCodec == null)
771+
cmd.add("-an"); //no audio
770772

771773
//cmd.add("-strict");
772774
//cmd.add("experimental");

0 commit comments

Comments
 (0)