Title: [236735] trunk/Source/WebCore
Revision
236735
Author
ab...@igalia.com
Date
2018-10-02 04:57:05 -0700 (Tue, 02 Oct 2018)

Log Message

[MSE][GStreamer] Add h264parse to accept MP4 without stss
https://bugs.webkit.org/show_bug.cgi?id=190143

Reviewed by Xabier Rodriguez-Calvar.

The MP4 file used in this URL does not contain a stss (Sync Sample
Box). In consequence, in acordance with the ISO BMFF spec, all samples
are assumed to be sync frames... But in this case that is not true,
it's just that the file is wrong (e.g. created with a buggy muxer).

http://orange-opensource.github.io/hasplayer.js/1.2.0/player.html?url=""

The way it works in other browsers is because instead of trusting the
MP4 stss table, they rely on parsing the h264 frames. We can do that
too.

This patch also changes RELEASE_ASSERT() when creating the parsers
to GLib criticals.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::createOptionalParserForFormat):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (236734 => 236735)


--- trunk/Source/WebCore/ChangeLog	2018-10-02 11:47:27 UTC (rev 236734)
+++ trunk/Source/WebCore/ChangeLog	2018-10-02 11:57:05 UTC (rev 236735)
@@ -1,3 +1,27 @@
+2018-10-02  Alicia Boya GarcĂ­a  <ab...@igalia.com>
+
+        [MSE][GStreamer] Add h264parse to accept MP4 without stss
+        https://bugs.webkit.org/show_bug.cgi?id=190143
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        The MP4 file used in this URL does not contain a stss (Sync Sample
+        Box). In consequence, in acordance with the ISO BMFF spec, all samples
+        are assumed to be sync frames... But in this case that is not true,
+        it's just that the file is wrong (e.g. created with a buggy muxer).
+
+        http://orange-opensource.github.io/hasplayer.js/1.2.0/player.html?url=""
+
+        The way it works in other browsers is because instead of trusting the
+        MP4 stss table, they rely on parsing the h264 frames. We can do that
+        too.
+
+        This patch also changes RELEASE_ASSERT() when creating the parsers
+        to GLib criticals.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::createOptionalParserForFormat):
+
 2018-10-02  Eric Carlson  <eric.carl...@apple.com>
 
         [MediaStream] RealtimeMediaSource should be able to vend hashed IDs

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (236734 => 236735)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-10-02 11:47:27 UTC (rev 236734)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2018-10-02 11:57:05 UTC (rev 236735)
@@ -859,14 +859,22 @@
 
     if (!g_strcmp0(mediaType, "audio/x-opus")) {
         GstElement* opusparse = gst_element_factory_make("opusparse", parserName.get());
-        RELEASE_ASSERT(opusparse);
+        g_return_val_if_fail(opusparse, nullptr);
+        ASSERT(opusparse);
         return GRefPtr<GstElement>(opusparse);
     }
     if (!g_strcmp0(mediaType, "audio/x-vorbis")) {
         GstElement* vorbisparse = gst_element_factory_make("vorbisparse", parserName.get());
-        RELEASE_ASSERT(vorbisparse);
+        g_return_val_if_fail(vorbisparse, nullptr);
+        ASSERT(vorbisparse);
         return GRefPtr<GstElement>(vorbisparse);
     }
+    if (!g_strcmp0(mediaType, "video/x-h264")) {
+        GstElement* h264parse = gst_element_factory_make("h264parse", parserName.get());
+        g_return_val_if_fail(h264parse, nullptr);
+        ASSERT(h264parse);
+        return GRefPtr<GstElement>(h264parse);
+    }
 
     return nullptr;
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to