mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 12:03:08 +00:00
Bug 1066935 - Part 1: Fix -Wsign-compare and -Wunreachable-code warnings in webrtc/signaling. r=jesup
This commit is contained in:
parent
2ac8d46cbb
commit
c228a42c0a
@ -101,8 +101,7 @@ WebrtcFrameTypeToGmpFrameType(webrtc::VideoFrameType aIn,
|
||||
*aOut = kGMPSkipFrame;
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
MOZ_CRASH("Unexpected VideoFrameType");
|
||||
}
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
@ -130,14 +129,12 @@ GmpFrameTypeToWebrtcFrameType(GMPVideoFrameType aIn,
|
||||
*aOut = webrtc::kSkipFrame;
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
MOZ_CRASH("Unexpected GMPVideoFrameType");
|
||||
}
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
WebrtcGmpVideoEncoder::InitEncode(const webrtc::VideoCodec* aCodecSettings,
|
||||
int32_t aNumberOfCores,
|
||||
@ -233,7 +230,6 @@ WebrtcGmpVideoEncoder::Encode(const webrtc::I420VideoFrame& aInputImage,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int32_t
|
||||
WebrtcGmpVideoEncoder::Encode_g(const webrtc::I420VideoFrame* aInputImage,
|
||||
const webrtc::CodecSpecificInfo* aCodecSpecificInfo,
|
||||
@ -245,9 +241,10 @@ WebrtcGmpVideoEncoder::Encode_g(const webrtc::I420VideoFrame* aInputImage,
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
if (aInputImage->width() != mCodecParams.mWidth ||
|
||||
aInputImage->height() != mCodecParams.mHeight) {
|
||||
LOGD(("GMP Encode: resolution change from %ux%u to %ux%u",
|
||||
MOZ_ASSERT(aInputImage->width() >= 0 && aInputImage->height() >= 0);
|
||||
if (static_cast<uint32_t>(aInputImage->width()) != mCodecParams.mWidth ||
|
||||
static_cast<uint32_t>(aInputImage->height()) != mCodecParams.mHeight) {
|
||||
LOGD(("GMP Encode: resolution change from %ux%u to %dx%d",
|
||||
mCodecParams.mWidth, mCodecParams.mHeight, aInputImage->width(), aInputImage->height()));
|
||||
|
||||
mGMP->Close();
|
||||
@ -329,8 +326,6 @@ WebrtcGmpVideoEncoder::Encode_g(const webrtc::I420VideoFrame* aInputImage,
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int32_t
|
||||
WebrtcGmpVideoEncoder::RegisterEncodeCompleteCallback(webrtc::EncodedImageCallback* aCallback)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user