Skip to content

Commit 5e0585f

Browse files
authored
Merge pull request #339 from MoZhouqi/main
Fix iOS playback error for certain Android-compressed videos
2 parents c94c402 + 578087b commit 5e0585f

File tree

1 file changed

+1
-4
lines changed
  • android/src/main/java/com/reactnativecompressor/Video/VideoCompressor/videoHelpers

1 file changed

+1
-4
lines changed

android/src/main/java/com/reactnativecompressor/Video/VideoCompressor/videoHelpers/Track.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ class Track(id: Int, format: MediaFormat, audio: Boolean) {
258258
}
259259

260260
private fun AudioSampleEntry.setup(format: MediaFormat): AudioSampleEntry = apply {
261-
channelCount =
262-
if (format.getInteger(MediaFormat.KEY_CHANNEL_COUNT) == 1) 2 else format.getInteger(
263-
MediaFormat.KEY_CHANNEL_COUNT
264-
)
261+
channelCount = format.getInteger(MediaFormat.KEY_CHANNEL_COUNT)
265262
sampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE).toLong()
266263
dataReferenceIndex = 1
267264
sampleSize = 16

0 commit comments

Comments
 (0)