@@ -169,7 +169,7 @@ class SourceBufferClientImpl final : public SourceBufferPrivateClient {
169169
170170Ref<SourceBuffer> SourceBuffer::create (Ref<SourceBufferPrivate>&& sourceBufferPrivate, MediaSource& source)
171171{
172- auto sourceBuffer = adoptRef (*new SourceBuffer (WTF::move (sourceBufferPrivate), source));
172+ Ref sourceBuffer = adoptRef (*new SourceBuffer (WTF::move (sourceBufferPrivate), source));
173173 sourceBuffer->suspendIfNeeded ();
174174 return sourceBuffer;
175175}
@@ -929,7 +929,7 @@ Ref<MediaPromise> SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegme
929929 // FIXME: Implement steps 5.2.1-5.2.8.1 as per Editor's Draft 09 January 2015, and reorder this
930930 // 5.2.1 Let new audio track be a new AudioTrack object.
931931 // 5.2.2 Generate a unique ID and assign it to the id property on new video track.
932- auto newAudioTrack = AudioTrack::create (protectedScriptExecutionContext ().get (), Ref { *audioTrackInfo.track });
932+ Ref newAudioTrack = AudioTrack::create (protectedScriptExecutionContext ().get (), Ref { *audioTrackInfo.track });
933933 newAudioTrack->addClient (*this );
934934 newAudioTrack->setSourceBuffer (this );
935935
@@ -976,7 +976,7 @@ Ref<MediaPromise> SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegme
976976 // FIXME: Implement steps 5.3.1-5.3.8.1 as per Editor's Draft 09 January 2015, and reorder this
977977 // 5.3.1 Let new video track be a new VideoTrack object.
978978 // 5.3.2 Generate a unique ID and assign it to the id property on new video track.
979- auto newVideoTrack = VideoTrack::create (protectedScriptExecutionContext ().get (), Ref { *videoTrackInfo.track });
979+ Ref newVideoTrack = VideoTrack::create (protectedScriptExecutionContext ().get (), Ref { *videoTrackInfo.track });
980980 newVideoTrack->addClient (*this );
981981 newVideoTrack->setSourceBuffer (this );
982982
@@ -1020,24 +1020,24 @@ Ref<MediaPromise> SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegme
10201020
10211021 // 5.4 For each text track in the initialization segment, run following steps:
10221022 for (auto & textTrackInfo : segment.textTracks ) {
1023- auto & textTrackPrivate = *textTrackInfo.track ;
1023+ Ref textTrackPrivate = *textTrackInfo.track ;
10241024
10251025 // FIXME: Implement steps 5.4.1-5.4.8.1 as per Editor's Draft 09 January 2015, and reorder this
10261026 // 5.4.1 Let new text track be a new TextTrack object with its properties populated with the
10271027 // appropriate information from the initialization segment.
1028- auto newTextTrack = InbandTextTrack::create (*protectedScriptExecutionContext (), textTrackPrivate);
1028+ Ref newTextTrack = InbandTextTrack::create (*protectedScriptExecutionContext (), textTrackPrivate);
10291029 newTextTrack->addClient (*this );
10301030
10311031 // 5.4.2 If the mode property on new text track equals "showing" or "hidden", then set active
10321032 // track flag to true.
1033- if (textTrackPrivate. mode () != InbandTextTrackPrivate::Mode::Disabled)
1033+ if (textTrackPrivate-> mode () != InbandTextTrackPrivate::Mode::Disabled)
10341034 activeTrackFlag = true ;
10351035
10361036 // 5.4.3 Add new text track to the textTracks attribute on this SourceBuffer object.
10371037 // 5.4.4 Queue a task to fire a trusted event named addtrack, that does not bubble and is
10381038 // not cancelable, and that uses the TrackEvent interface, at textTracks attribute on this
10391039 // SourceBuffer object.
1040- textTracks->append (newTextTrack. get () );
1040+ textTracks->append (newTextTrack);
10411041
10421042 // 5.4.5 Add new text track to the textTracks attribute on the HTMLMediaElement.
10431043 // 5.4.6 Queue a task to fire a trusted event named addtrack, that does not bubble and is
@@ -1051,13 +1051,13 @@ Ref<MediaPromise> SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegme
10511051 // Let mirrored text track be a new TextTrack object.
10521052 // Assign the same property values to mirrored text track as were determined for new text track.
10531053 // Add mirrored text track to the textTracks attribute on the HTMLMediaElement.
1054- source->addTextTrackMirrorToElement (textTrackPrivate);
1054+ source->addTextTrackMirrorToElement (textTrackPrivate. get () );
10551055 }
10561056
10571057 m_textCodecs.append (RefPtr { textTrackInfo.description }->codec ().toAtomString ());
10581058
10591059 // 5.4.7 Create a new track buffer to store coded frames for this track.
1060- m_private->addTrackBuffer (textTrackPrivate. id (), WTF::move (textTrackInfo.description ));
1060+ m_private->addTrackBuffer (textTrackPrivate-> id (), WTF::move (textTrackInfo.description ));
10611061 }
10621062
10631063 // 5.5 If active track flag equals true, then run the following steps:
@@ -1405,11 +1405,11 @@ void SourceBuffer::updateBuffered()
14051405 if (isManaged ()) {
14061406 auto addedRanges = m_buffered->ranges ();
14071407 addedRanges -= oldRanges;
1408- auto addedTimeRanges = TimeRanges::create (WTF::move (addedRanges));
1408+ Ref addedTimeRanges = TimeRanges::create (WTF::move (addedRanges));
14091409
14101410 auto removedRanges = oldRanges;
14111411 removedRanges -= m_buffered->ranges ();
1412- auto removedTimeRanges = TimeRanges::create (WTF::move (removedRanges));
1412+ Ref removedTimeRanges = TimeRanges::create (WTF::move (removedRanges));
14131413
14141414 queueTaskToDispatchEvent (*this , TaskSource::MediaElement, BufferedChangeEvent::create (WTF::move (addedTimeRanges), WTF::move (removedTimeRanges)));
14151415 }
0 commit comments