WebKit Bugzilla
Attachment 370141 Details for
Bug 197997
: Make AVVideoCaptureSource more robust to configuration failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197997-20190517133910.patch (text/plain), 2.98 KB, created by
youenn fablet
on 2019-05-17 13:39:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-05-17 13:39:11 PDT
Size:
2.98 KB
patch
obsolete
>Subversion Revision: 245471 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e8c3abf7915a52a1ac1fa19f1bc35629c873c7e7..ba4fb2ba3441aca8db4b3810f49b0ba237df7d25 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2019-05-17 Youenn Fablet <youenn@apple.com> >+ >+ Make AVVideoCaptureSource more robust to configuration failures >+ https://bugs.webkit.org/show_bug.cgi?id=197997 >+ rdar://problem/50875662 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Covered by manual testing. >+ >+ * platform/mediastream/mac/AVVideoCaptureSource.mm: >+ (WebCore::AVVideoCaptureSource::setSessionSizeAndFrameRate): >+ Make sure to commit configuration once calling beginConfiguration. >+ In case of error in setting frame rate, log the error but continue capturing. >+ > 2019-05-17 Simon Fraser <simon.fraser@apple.com> > > REGRESSION (r245170): gmail.com header flickers when hovering over the animating buttons >diff --git a/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm b/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm >index 3cdca3042311658ba6839bf4812fdef8fbb032f0..f66d0118c1cf668d40e5c04ec75eb15262256fde 100644 >--- a/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm >+++ b/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm >@@ -324,20 +324,21 @@ void AVVideoCaptureSource::setSessionSizeAndFrameRate() > > auto* frameRateRange = frameDurationForFrameRate(m_currentFrameRate); > ASSERT(frameRateRange); >- if (!frameRateRange) >- return; >+ if (frameRateRange) { >+ m_currentFrameRate = clampTo(m_currentFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate); > >- m_currentFrameRate = clampTo(m_currentFrameRate, frameRateRange.minFrameRate, frameRateRange.maxFrameRate); >- >- ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate); >- [device() setActiveVideoMinFrameDuration: CMTimeMake(1, m_currentFrameRate)]; >- [device() setActiveVideoMaxFrameDuration: CMTimeMake(1, m_currentFrameRate)]; >+ ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "setting frame rate to ", m_currentFrameRate); >+ [device() setActiveVideoMinFrameDuration: CMTimeMake(1, m_currentFrameRate)]; >+ [device() setActiveVideoMaxFrameDuration: CMTimeMake(1, m_currentFrameRate)]; >+ } else >+ ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, "cannot find proper frame rate range for the selected preset\n"); > > [device() unlockForConfiguration]; > } > } @catch(NSException *exception) { > ERROR_LOG_IF(loggerPtr(), LOGIDENTIFIER, "error configuring device ", [[exception name] UTF8String], ", reason : ", [[exception reason] UTF8String]); >- return; >+ [device() unlockForConfiguration]; >+ ASSERT_NOT_REACHED(); > } > [m_session commitConfiguration]; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197997
: 370141