Remove return values from MediaDataDecoder

RESOLVED FIXED in Firefox 51

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

Trunk
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

These are basically entirely unused, and the few cases where they are can be replaced with a call to Error() on the callback.
Attachment #8789219 - Flags: review?(cpearce)
Comment on attachment 8789219 [details] [diff] [review]
remove-media-data-decoder-retvals

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

r=me with two changes made

::: dom/media/platforms/wrappers/H264Converter.cpp
@@ +54,5 @@
>  {
>    if (!mp4_demuxer::AnnexB::ConvertSampleToAVCC(aSample)) {
>      // We need AVCC content to be able to later parse the SPS.
>      // This is a no-op if the data is already AVCC.
> +    mCallback->Error(MediaDataDecoderError::FATAL_ERROR);

i think this should be a decode error too

@@ +78,5 @@
>    } else {
>      rv = CheckForSPSChange(aSample);
>    }
> +  if (NS_FAILED(rv)) {
> +    mCallback->Error(MediaDataDecoderError::FATAL_ERROR);

this one shouldn't be a fatal error, but decode error. it could be that the sps was invalid
Attachment #8789219 - Flags: review?(cpearce) → review+
Bonus points if documentation of MediaDataDecoder is amended to point out that CallBack::Error must be called whenever an error occurs.
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/daea33341cc4
Remove unnecessary nsresult return value from MediaDataDecoder interface. r=jya
https://hg.mozilla.org/mozilla-central/rev/daea33341cc4
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.