Closed Bug 917314 Opened 11 years ago Closed 8 years ago

texImage2D() throws NS_ERROR_FAILURE when passed a WebRTC HTMLVideoElement

Categories

(Core :: Graphics: CanvasWebGL, defect)

23 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: robman, Unassigned)

Details

Attachments

(2 files)

Attached file index.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release) Build ID: 20130803193343 Steps to reproduce: Open the attached index.html test page in both Firefox and Chrome to compare. This page sets up a basic test that lets us use texImage2D() to load pixel data from an HTMLVideoElement. It doesn't visibly do anything useful, it is just the minimal part of a larger project that has been cut down to isolate this problem in a repeatable form for you. NOTE: Tested on 23 and also latest nightly. Actual results: Firefox throws an NS_ERROR_FAILURE on line 115. gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, input); If you uncomment line 126 you can see that this call works fine when "input" is an HTMLImageElement instead of an HTMLVideoElement. Chrome processes this line fine without throwing any errors. Expected results: Line 115 should have been processed without throwing any error in Firefox and the pixel data should be able to be passed down to WebGL Fragment Shaders, etc. See http://www.khronos.org/registry/webgl/specs/1.0/#TEXIMAGE2D
Attachment #806009 - Attachment mime type: text/plain → text/html
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
This is specifically for a WebRTC video. It's probably just an issue with our CORS logic.
Summary: texImage2D() throws NS_ERROR_FAILURE when passed an HTMLVideoElement → texImage2D() throws NS_ERROR_FAILURE when passed a WebRTC HTMLVideoElement
This doesn't appear to be CORS related. I can work around this example by adding in an extra check before the texImage2D call to make sure the video has actual dimensions before making the call. It appears when you try to upload the video frame before the video is actually "there" it causes an error. However, I don't think this should be causing NS_ERROR_FAILURE.
Doesn't appear to cause the error any more on FF Nightly/Linux.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: