зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1592915 - Fix three warnings in `VideoFrameConverter.h` and `TestVideoTrackEncoder.h`. r=pehrsons
This warns because an expression with a side effect is inside a `static_assert` or `sizeof`. Differential Revision: https://phabricator.services.mozilla.com/D51243 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
902b013ad7
Коммит
f321d6becd
|
@ -360,7 +360,10 @@ class VideoFrameConverter {
|
|||
rtc::scoped_refptr<webrtc::I420Buffer> buffer =
|
||||
mBufferPool.CreateBuffer(aFrame.mSize.width, aFrame.mSize.height);
|
||||
if (!buffer) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(++mFramesDropped <= 100, "Buffers must be leaking");
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
++mFramesDropped;
|
||||
#endif
|
||||
MOZ_DIAGNOSTIC_ASSERT(mFramesDropped <= 100, "Buffers must be leaking");
|
||||
MOZ_LOG(gVideoFrameConverterLog, LogLevel::Warning,
|
||||
("Creating a buffer failed"));
|
||||
return;
|
||||
|
|
|
@ -331,7 +331,8 @@ TEST(VP8VideoTrackEncoder, TimestampFrameEncode)
|
|||
uint64_t totalDuration = 0;
|
||||
size_t i = 0;
|
||||
for (auto& frame : frames) {
|
||||
EXPECT_EQ(expectedDurations[i++], frame->mDuration);
|
||||
EXPECT_EQ(expectedDurations[i], frame->mDuration);
|
||||
i++;
|
||||
totalDuration += frame->mDuration;
|
||||
}
|
||||
const uint64_t pointThree = (PR_USEC_PER_SEC / 10) * 3;
|
||||
|
@ -380,7 +381,8 @@ TEST(VP8VideoTrackEncoder, DriftingFrameEncode)
|
|||
uint64_t totalDuration = 0;
|
||||
size_t i = 0;
|
||||
for (auto& frame : frames) {
|
||||
EXPECT_EQ(expectedDurations[i++], frame->mDuration);
|
||||
EXPECT_EQ(expectedDurations[i], frame->mDuration);
|
||||
i++;
|
||||
totalDuration += frame->mDuration;
|
||||
}
|
||||
const uint64_t pointSix = (PR_USEC_PER_SEC / 10) * 6;
|
||||
|
|
Загрузка…
Ссылка в новой задаче