< prev index next >

modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java

Print this page
rev 11235 : imported patch 13.patch

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -149,10 +149,17 @@
                         }
                     } catch (InterruptedException ex) {
                         // Ignore it.
                     }
 
+                    // Check if error event was set. We will not go to READY or
+                    // HALT state in this case. Error event is basically same
+                    // as HALT.
+                    if (player.isErrorEventCached()) {
+                        break;
+                    }
+
                     state = player.getState();
                 }
 
                 // If the player is not READY, an error occurred.
                 if (player.getState() != PlayerState.READY) {
< prev index next >