[Android] VideoPlayerActivity: remove the double call to postDelayed to set the ES track lists.

Adrien Maglo git at videolan.org
Tue Oct 29 17:27:16 CET 2013


vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Oct 29 17:27:07 2013 +0100| [01081c6207b685308013dcb561c6e8ac670fea65] | committer: Adrien Maglo

VideoPlayerActivity: remove the double call to postDelayed to set the ES track lists.

Call setESTrackLists when the MediaPlayerPlaying event has been triggered.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=01081c6207b685308013dcb561c6e8ac670fea65
---

 .../videolan/vlc/gui/video/VideoPlayerActivity.java    |   16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index a17bab9..5cd621e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -440,20 +440,6 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                 Log.i(TAG, "Adding user-selected subtitle " + file);
                 mLibVLC.addSubtitleTrack(file);
             }
-            /** FIXME remove when #7540 ES are not updated mid-stream
-             *  a.k.a. subtitle events is fixed
-             */
-            mHandler.postDelayed(new Runnable() {
-                @Override
-                public void run() {
-                    setESTrackLists(true);
-
-                    mHandler.postDelayed(new Runnable() {
-                        @Override
-                        public void run() {
-                            setESTrackLists(true);
-                        }}, 1200);
-                }}, 1000);
         }
     }
 
@@ -666,6 +652,8 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
                 case EventHandler.MediaPlayerPlaying:
                     Log.i(TAG, "MediaPlayerPlaying");
                     activity.showOverlay();
+                    /** FIXME: update the track list when it changes during the playback. */
+                    activity.setESTrackLists(true);
                     activity.setESTracks();
                     break;
                 case EventHandler.MediaPlayerPaused:



More information about the Android mailing list