From 5e6d8ad763581fae8b4a5ef30cf1ac151d8baa44 Mon Sep 17 00:00:00 2001 From: Anudeep Reddy Date: Sat, 23 Dec 2023 09:43:48 +0530 Subject: [PATCH] release media object after setMedia --- .../main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java b/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java index df0c1591..63ebf811 100755 --- a/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java +++ b/android/src/main/java/com/yuanzhou/vlc/vlcplayer/ReactVlcPlayerView.java @@ -399,6 +399,7 @@ private void createPlayer(boolean autoplayResume, boolean isResume) { } mVideoInfo = null; mMediaPlayer.setMedia(m); + m.release(); mMediaPlayer.setScale(0); if (_subtitleUri != null) { mMediaPlayer.addSlave(Media.Slave.Type.Subtitle, _subtitleUri, true);