File tree Expand file tree Collapse file tree
mediaplayer/src/jvmMain/kotlin/io/github/kdroidfilter/composemediaplayer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ class LinuxVideoPlayerState : VideoPlayerState {
379379 try {
380380 val width = LinuxNativeBridge .nGetFrameWidth(ptr)
381381 val height = LinuxNativeBridge .nGetFrameHeight(ptr)
382- val duration = LinuxNativeBridge .nGetVideoDuration(ptr).toLong()
382+ val duration = ( LinuxNativeBridge .nGetVideoDuration(ptr) * 1000 ).toLong()
383383 val frameRate = LinuxNativeBridge .nGetFrameRate(ptr)
384384 val newAspectRatio =
385385 if (width > 0 && height > 0 ) {
Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ class MacVideoPlayerState : VideoPlayerState {
448448 try {
449449 val width = MacNativeBridge .nGetFrameWidth(ptr)
450450 val height = MacNativeBridge .nGetFrameHeight(ptr)
451- val duration = MacNativeBridge .nGetVideoDuration(ptr).toLong()
451+ val duration = ( MacNativeBridge .nGetVideoDuration(ptr) * 1000 ).toLong()
452452 val frameRate = MacNativeBridge .nGetVideoFrameRate(ptr)
453453
454454 // Calculate aspect ratio
You can’t perform that action at this time.
0 commit comments