getUserMedia video capture doesn't handle odd (&1) widths/heights correctly

RESOLVED FIXED in mozilla33

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jesup, Assigned: jesup)

Tracking

Trunk
mozilla33
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The DeliverFrame() code in getUserMedia doesn't handle odd widths or heights correctly.  You have to be *very* careful to round up in the right places for i420 video.
Attachment #8456375 - Flags: review?(giles)
Comment on attachment 8456375 [details] [diff] [review]
ensure odd widths/heights in getUserMedia are handled correctly

Review of attachment 8456375 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ +79,5 @@
>      return 0;
>    }
>  
> +  MOZ_ASSERT(mWidth*mHeight + 2*(((mWidth+1)/2)*((mHeight+1)/2)) == size);
> +  if (mWidth*mHeight + 2*(((mWidth+1)/2)*((mHeight+1)/2)) != size) {

Please combine these somehow. You shouldn't be calculating twice for two different failure options.
Attachment #8456375 - Flags: review?(giles) → review+
https://hg.mozilla.org/mozilla-central/rev/6c7bd77200db
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.