Closed Bug 1312332 Opened 9 years ago Closed 9 years ago

Bad `stopVideo` check in GUMCallbackMediaStreamListener::NotifyChromeOfTrackStops

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox51 --- unaffected
firefox52 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

(Whiteboard: CID 1374148)

Attachments

(1 file)

gerald pinged me about an issue that Coverity reported for this method: > >>> CID 1374148: Control flow issues (DEADCODE) > >>> Execution cannot reach the expression "this->mAudioDevice.get()" inside > this statement: "<storage from new>->MediaOp...". > 3640 RefPtr<MediaOperationTask> mediaOperation = > 3641 new MediaOperationTask(MEDIA_STOP_TRACK, > 3642 this, nullptr, nullptr, > 3643 stopAudio ? mAudioDevice.get() : nullptr, > 3644 stopVideo ? mVideoDevice.get() : nullptr, > 3645 false , mWindowID, nullptr); He also points out that a check above this looks bad: > 3630: if ((stopAudio || mAudioStopped || !mAudioDevice) && > 3631: (stopAudio || mVideoStopped || !mVideoDevice)) { And indeed, that second line should check `stopVideo` instead. Good thing that this is only on 52 and we can easily fix it.
Thank you for taking care of this.
Whiteboard: CID 1374148
Blocks: 1284102
Rank: 25
Attachment #8803770 - Flags: review?(jib) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: