<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>136450</bug_id>
          
          <creation_ts>2014-09-02 05:41:37 -0700</creation_ts>
          <short_desc>[GStreamer] GST_STREAM_ERROR_TYPE_NOT_FOUND errors are skipped</short_desc>
          <delta_ts>2015-03-04 05:40:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fabien Vallée">fvallee</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1032603</commentid>
    <comment_count>0</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-09-02 05:41:37 -0700</bug_when>
    <thetext>Tested on linux / gtk port / gstreamer 1.4.0 but same issue was already there long time ago in Qt port / gstreamer 0.10.19 
(code is very old, http://trac.webkit.org/changeset/83598).

When gstreamer send &quot;GST_STREAM_ERROR_TYPE_NOT_FOUND&quot; error, the error is skipped (= not reported to the MediaPlayerClient)

http://trac.webkit.org/browser/releases/WebKitGTK/webkit-2.4/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp?annotate=blame&amp;rev=172912#L1027

Definition of stalled event is : &quot;The user agent is trying to fetch media data, but data is unexpectedly not forthcoming&quot; 
http://www.w3.org/TR/2011/WD-html5-20110113/video.html#event-media-stalled

Definition of GST_STREAM_ERROR_TYPE_NOT_FOUND is &quot;used when the element doesn&apos;t know the stream&apos;s type.&quot;
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstGError.html

GST_STREAM_ERROR_TYPE_NOT_FOUND doesn&apos;t seems related to &quot;data is unexpectedly not forthcoming&quot;. I don&apos;t know why GST_STREAM_ERROR_TYPE_NOT_FOUND was chosen, but the code is very very old, so maybe gst was lacking some error type back then.

Anyway this cause troubles: when gstreamer try to play an invalid video, it will usually trigger GST_STREAM_ERROR_TYPE_NOT_FOUND.

I didn&apos;t find any &apos;stalled&apos; related regression test, but in LayoutTests/media/broken-video.html, playback of LayoutTests/media/content/garbage.mp4 triggers 2 errors:

Error 4: Could not determine type of stream. (url=file:///xxxx/LayoutTests/media/content/garbage.mp4)
GST_STREAM_ERROR: 4, Could not determine type of stream.
Decode error, let the Media element emit a stalled event.
Error 1: GStreamer encountered a general stream error. (url=file:///xxxx/LayoutTests/media/content/garbage.mp4)
GST_STREAM_ERROR: 1, GStreamer encountered a general stream error.

First error (GST_STREAM_ERROR: 4) is skipped, but second error (GST_STREAM_ERROR: 1) is handled and the test can pass (but only because of the second error).

However if I change the video src to another invalid video (http://itv.mit-xperts.com/hbbtvtest/playerevents/novideo.php/video.mp4), only
&quot;GST_STREAM_ERROR: 4, Could not determine type of stream&quot; error is triggered.
As GST_STREAM_ERROR_TYPE_NOT_FOUND is skipped, the error event is never triggered and the test timeout.

Same test (using modified video src) works fine using chromium (Version 36.0.1985.125 (283153)) and opera 12.16.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032604</commentid>
    <comment_count>1</comment_count>
      <attachid>237484</attachid>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-09-02 05:45:52 -0700</bug_when>
    <thetext>Created attachment 237484
based on LayoutTest/media/broken-video.html only changed the video src

test can pass using chromium (Version 36.0.1985.125 (283153)) and opera 12.16.
Fails (timeout, no event triggered) using webkitgtk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032606</commentid>
    <comment_count>2</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-09-02 05:58:55 -0700</bug_when>
    <thetext>To correct my first comment, there are tests for &apos;stalled&apos; event, e.g. :
LayoutTests/http/tests/media/video-play-stall.html
The test timeout as per https://bugs.webkit.org/show_bug.cgi?id=108925
but even if I increase run-webkit-tests timeout I don&apos;t think gstreamer is sending GST_STREAM_ERROR_TYPE_NOT_FOUND message in that case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032608</commentid>
    <comment_count>3</comment_count>
      <attachid>237484</attachid>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-09-02 06:11:09 -0700</bug_when>
    <thetext>Comment on attachment 237484
based on LayoutTest/media/broken-video.html only changed the video src

need to copy the file to LayoutTest/media/ folder to access media-file.js and video-test.js</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032611</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2014-09-02 07:15:22 -0700</bug_when>
    <thetext>This code was actually introduced in http://trac.webkit.org/changeset/81229 and I think that reverting it will break a test again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1032614</commentid>
    <comment_count>5</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2014-09-02 07:59:30 -0700</bug_when>
    <thetext>Yeah, I agree, anyway thanks Philippe for answer.
I will try to check what&apos;s going on in video-play-stall-before-meta-data.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1074050</commentid>
    <comment_count>6</comment_count>
    <who name="Fabien Vallée">fvallee</who>
    <bug_when>2015-03-04 05:40:39 -0800</bug_when>
    <thetext>won&apos;t fix.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>237484</attachid>
            <date>2014-09-02 05:45:52 -0700</date>
            <delta_ts>2014-09-02 06:11:09 -0700</delta_ts>
            <desc>based on LayoutTest/media/broken-video.html only changed the video src</desc>
            <filename>broken-video-136450.html</filename>
            <type>text/html</type>
            <size>624</size>
            <attacher name="Fabien Vallée">fvallee</attacher>
            
              <data encoding="base64">PHZpZGVvIGNvbnRyb2xzPjwvdmlkZW8+CjxwPlRlc3QgdGhhdCBhbiBpbnZhbGlkIHZpZGVvIGZp
bGUgZ2VuZXJhdGVzIGEgTUVESUFfRVJSX1NSQ19OT1RfU1VQUE9SVEVEIGVycm9yIGFuZCBzZXRz
IG5ldHdvcmtTdGF0ZSB0byBORVRXT1JLX05PX1NPVVJDRS48L3A+CjxzY3JpcHQgc3JjPW1lZGlh
LWZpbGUuanM+PC9zY3JpcHQ+CjxzY3JpcHQgc3JjPXZpZGVvLXRlc3QuanM+PC9zY3JpcHQ+Cgo8
c2NyaXB0PgogICAgdmlkZW8uc3JjID0gJ2h0dHA6Ly9pdHYubWl0LXhwZXJ0cy5jb20vaGJidHZ0
ZXN0L3BsYXllcmV2ZW50cy9ub3ZpZGVvLnBocC92aWRlby5tcDQnCiAgICB3YWl0Rm9yRXZlbnQo
ImVycm9yIiwgZnVuY3Rpb24gKCkgewogICAgICAgIHRlc3RFeHBlY3RlZCgidmlkZW8uZXJyb3Ii
LCAiW29iamVjdCBNZWRpYUVycm9yXSIpOwogICAgICAgIHRlc3RFeHBlY3RlZCgidmlkZW8uZXJy
b3IuY29kZSIsIE1lZGlhRXJyb3IuTUVESUFfRVJSX1NSQ19OT1RfU1VQUE9SVEVEKTsKICAgICAg
ICB0ZXN0RXhwZWN0ZWQoInZpZGVvLm5ldHdvcmtTdGF0ZSIsIEhUTUxNZWRpYUVsZW1lbnQuTkVU
V09SS19OT19TT1VSQ0UpOwogICAgICAgIGVuZFRlc3QoKTsKICAgIH0pOwo8L3NjcmlwdD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>