Closed Bug 800564 Opened 12 years ago Closed 9 years ago

In libyuv, MJPGToI420() throws away the return code in many cases

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

Details

(Whiteboard: [getUserMedia])

Attachments

(1 file, 1 obsolete file)

int MJPGToI420() in libyuv:
media/webrtc/trunk/third_party/libyuv/source/convert.cc
Location:	line 1607

a bunch of cases in the code set 'ret' to the result of a conversion, but then it throws them away and returns 0 (success).

Upstream issue in libyuv/webrtc.org.
Priority: -- → P3
Whiteboard: [WebRTC], [blocking-webrtc-]
Comment on attachment 8365493 [details] [diff] [review]
Handle MJPEG decode errors (and log camera type acquired)

Very simple patch.  See bug 963907 for an example of why this is needed.  I've filed Issue 2847 at webrtc.org for this
Attachment #8365493 - Flags: review?(tterribe)
Whiteboard: [WebRTC], [blocking-webrtc-] → [getUserMedia]
refresh to apply on top of libyuv update.  Fix MJPEG decode to ARGB as well as I420 (to match upstream)
Attachment #8365493 - Attachment is obsolete: true
Attachment #8365493 - Flags: review?(tterribe)
Comment on attachment 8368175 [details] [diff] [review]
Handle MJPEG decode errors (and log camera type acquired)

The "ret ? 0 : 1;"'s are cribbed from upstream (what I suggested to them when I filed the bug).
Attachment #8368175 - Flags: review?(adam)
Comment on attachment 8368175 [details] [diff] [review]
Handle MJPEG decode errors (and log camera type acquired)

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

Looks good, with very minor nits.

::: content/media/webrtc/MediaEngineWebRTCVideo.cpp
@@ +208,5 @@
>        }
>      }
>    }
> +  LOG(("chose cap type %d, %dx%d @%dfps",
> +       mCapability.rawType, mCapability.width, mCapability.height, mCapability.maxFPS));

Format strings should be %u rather than %d.

Since the underlying size of an enum is allowed to vary, please static_cast<unsigned int>(mCapability.rawType).

This line is 88 columns wide; consider wrapping to 80.
Attachment #8368175 - Flags: review?(adam) → review+
backlog: --- → webRTC+
Rank: 38
If this hasn't landed or become moot, we should refresh and land it.
Assignee: nobody → rjesup
Flags: needinfo?(rjesup)
QA Contact: jsmith
We should land this if it's not moot
https://hg.mozilla.org/mozilla-central/rev/a9f93ff23f70
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Flags: needinfo?(rjesup)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: