changeset 9944:373afb4b2900

8178462: Improve FX media playing Reviewed-by: kcr, ddehaven
author almatvee
date Mon, 22 May 2017 16:28:24 -0700
parents 77c419fe360d
children fb471acf264b
files modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/build/osx/config.h modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/glib/gmain.c modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/sys/directsound/gstdirectsoundsink.c modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/plugins/elements/gstqueue.c modules/media/src/main/native/gstreamer/plugins/vp6/flvdemux.c
diffstat 5 files changed, 16 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/build/osx/config.h	Thu May 18 17:02:24 2017 -0700
+++ b/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/build/osx/config.h	Mon May 22 16:28:24 2017 -0700
@@ -12,7 +12,7 @@
 #endif
 
 /* poll doesn't work on devices */
-#define BROKEN_POLL 1
+/* #undef BROKEN_POLL */
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
--- a/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/glib/gmain.c	Thu May 18 17:02:24 2017 -0700
+++ b/modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/glib/gmain.c	Mon May 22 16:28:24 2017 -0700
@@ -3112,6 +3112,11 @@
       context->cached_poll_array_size = allocated_nfds = nfds;
       context->cached_poll_array = fds = g_new (GPollFD, nfds);
       UNLOCK_CONTEXT (context);
+#ifdef GSTREAMER_LITE
+      if (fds == NULL) {
+        return FALSE;
+      }
+#endif // GSTREAMER_LITE
     }
 
   if (!block)
--- a/modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/sys/directsound/gstdirectsoundsink.c	Thu May 18 17:02:24 2017 -0700
+++ b/modules/media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/sys/directsound/gstdirectsoundsink.c	Mon May 22 16:28:24 2017 -0700
@@ -806,7 +806,7 @@
   dsoundsink = GST_DIRECTSOUND_SINK (asink);
 
 #ifdef GSTREAMER_LITE
-  if (dsoundsink->pDS == NULL)
+  if (dsoundsink->pDS == NULL || dsoundsink->pDSBSecondary == NULL)
     return nNbSamplesInQueue;
 #endif // GSTREAMER_LITE
 
--- a/modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/plugins/elements/gstqueue.c	Thu May 18 17:02:24 2017 -0700
+++ b/modules/media/src/main/native/gstreamer/gstreamer-lite/gstreamer/plugins/elements/gstqueue.c	Mon May 22 16:28:24 2017 -0700
@@ -1249,6 +1249,11 @@
   GstFlowReturn ret;
 
   queue = (GstQueue *) GST_PAD_PARENT (pad);
+#ifdef GSTREAMER_LITE
+  if (queue == NULL) {
+    return;
+  }
+#endif // GSTREAMER_LITE
 
   /* have to lock for thread-safety */
   GST_QUEUE_MUTEX_LOCK_CHECK (queue, out_flushing);
--- a/modules/media/src/main/native/gstreamer/plugins/vp6/flvdemux.c	Thu May 18 17:02:24 2017 -0700
+++ b/modules/media/src/main/native/gstreamer/plugins/vp6/flvdemux.c	Mon May 22 16:28:24 2017 -0700
@@ -986,6 +986,10 @@
     GstBuffer* block = NULL;
 
     filter = FLV_DEMUX (GST_OBJECT_PARENT (pad));
+    if (filter == NULL) {
+        gst_pad_pause_task(pad);
+        return;
+    }
 
     //fprintf(stderr, "Pulling %d bytes at %d\n", (int)filter->parser.next_block_size,
     //        (int)filter->parser.file_position);