Closed Bug 981471 Opened 10 years ago Closed 10 years ago

[MediaEncoder] Validate input image in OMXVideoEncoder::Encode()

Categories

(Core :: Audio/Video: Recording, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jhlin, Assigned: jhlin)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ft:multimedia-platform])

Attachments

(1 file)

To pass the test of :CJKu in bug 979812 attachment 8385986 [details]. I.e., return error when the input image has no actual buffer.
Check input images and reject invalid or unsupported ones.
Attachment #8388343 - Flags: feedback?(cku)
Attachment #8388343 - Flags: feedback?(cku) → feedback+
Whiteboard: [ft:multimedia-platform]
Summary: [Media encoder] Validate input image in OMXVideoEncoder::Encode() → [MediaEncoder] Validate input image in OMXVideoEncoder::Encode()
Comment on attachment 8388343 [details] [diff] [review]
bug-981471-validate-input-image.patch

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

::: content/media/omx/OMXCodecWrapper.cpp
@@ +236,5 @@
> +{
> +  if (!aImage) {
> +    // Muted/blank/black image.
> +    return true;
> +  } else {

Looks like that you don't need the "else" scope, remove the "else" and indent them.
In fact the invalid image will be caught by assertion at [1] so there seems no need for additional validation.

[1] http://dxr.mozilla.org/mozilla-central/source/content/media/omx/OMXCodecWrapper.cpp?from=OMXCodecWrapper.cpp#401
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: