changeset 11249:3f29f685f4e1

8213510: [Windows] MediaPlayer does not play some mp3 with artwork stream in mjpeg Reviewed-by: kcr
author almatvee
date Fri, 19 Apr 2019 15:11:59 -0700
parents 58afdd563c0d
children d8a1e8de16bc
files modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c	Wed Apr 17 10:22:34 2019 +0530
+++ b/modules/javafx.media/src/main/native/gstreamer/gstreamer-lite/gst-plugins-good/gst/audioparsers/gstmpegaudioparse.c	Fri Apr 19 15:11:59 2019 -0700
@@ -471,6 +471,17 @@
     return FALSE;
   }
   /* if it's an invalid bitrate */
+#ifdef GSTREAMER_LITE
+  // Lets disable free format, since it is not supported by dshowwrapper.
+  // It was enabled with JDK-8199527 (GStreamer 1.14), we disabling it in same
+  // way as before 1.14. This required to fix issue with some MP3 files.
+  // See JDK-8213510.
+  if (((head >> 12) & 0xf) == 0x0) {
+    GST_WARNING_OBJECT (mp3parse, "invalid bitrate: 0x%lx."
+        "Free format files are not supported yet", (head >> 12) & 0xf);
+    return FALSE;
+  }
+#endif // GSTREAMER_LITE
   if (((head >> 12) & 0xf) == 0xf) {
     GST_WARNING_OBJECT (mp3parse, "invalid bitrate: 0x%lx", (head >> 12) & 0xf);
     return FALSE;