<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:mario&#64;webkit.org" title="Mario Sanchez Prada &lt;mario&#64;webkit.org&gt;"> <span class="fn">Mario Sanchez Prada</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] unrelated codecs required to play videos"
   href="https://bugs.webkit.org/show_bug.cgi?id=135972">bug 135972</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>mario&#64;webkit.org
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] unrelated codecs required to play videos"
   href="https://bugs.webkit.org/show_bug.cgi?id=135972#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GStreamer] unrelated codecs required to play videos"
   href="https://bugs.webkit.org/show_bug.cgi?id=135972">bug 135972</a>
              from <span class="vcard"><a class="email" href="mailto:mario&#64;webkit.org" title="Mario Sanchez Prada &lt;mario&#64;webkit.org&gt;"> <span class="fn">Mario Sanchez Prada</span></a>
</span></b>
        <pre>For the record, I'm pasting below the patch that I just applied downstream yesterday that is serving us well for the time being in our particular and controlled scenario.

Notice that I'm not asking for review over it, as I understand that solution is not valid for upstream, just sharing in case it's useful to someone else. That said, if someone wants to take over on making a real patch, or guiding me on what exactly would be a good enough way to do it, I'm happy to help. 

--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
&#64;&#64; -1690,6 +1690,25 &#64;&#64; void MediaPlayerPrivateGStreamer::loadin
     m_readyTimerHandler.cancel();
 }

+static bool gstRegistryHasDecoder(const String&amp; decoder)
+{
+    GList *decoder_factories, *gst_decoders;
+    GstCaps *caps;
+    bool retval;
+
+    decoder_factories = gst_element_factory_list_get_elements (GST_ELEMENT_FACTORY_TYPE_DECODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO, GST_RANK_MARGINAL);
+    caps = gst_caps_new_empty_simple (decoder.utf8().data());
+    gst_decoders = gst_element_factory_list_filter (decoder_factories, caps, GST_PAD_SINK, FALSE);
+    gst_caps_unref (caps);
+
+    retval = gst_decoders != NULL;
+
+    gst_plugin_feature_list_free (gst_decoders);
+    gst_plugin_feature_list_free (decoder_factories);
+
+    return retval;
+}
+
 static HashSet&lt;String&gt; mimeTypeCache()
 {
     initializeGStreamerAndRegisterWebKitElements();
&#64;&#64; -1768,7 +1787,6 &#64;&#64; static HashSet&lt;String&gt; mimeTypeCache()
         &quot;video/flv&quot;,
         &quot;video/mj2&quot;,
         &quot;video/mp2t&quot;,
-        &quot;video/mp4&quot;,
         &quot;video/mpeg&quot;,
         &quot;video/mpegts&quot;,
         &quot;video/ogg&quot;,
&#64;&#64; -1795,6 +1813,15 &#64;&#64; static HashSet&lt;String&gt; mimeTypeCache()
     for (unsigned i = 0; i &lt; (sizeof(mimeTypes) / sizeof(*mimeTypes)); ++i)
         cache.add(String(mimeTypes[i]));

+    if (gstRegistryHasDecoder(String::fromUTF8(&quot;video/x-h264&quot;)))
+        cache.add(String::fromUTF8(&quot;video/mp4&quot;));
+
     typeListInitialized = true;
     return cache;
 }</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>