Closed Bug 1301294 Opened 4 years ago Closed 4 years ago

Remove return values from MediaDataDecoder

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Details

Attachments

(1 file)

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: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.