mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 1035531 - Discard buffer instead of assert if camera media frame comes in early. r=mikeh
This commit is contained in:
parent
9543d31f31
commit
5dedebb8ed
@ -709,7 +709,12 @@ void GonkCameraSource::dataCallbackTimestamp(int64_t timestampUs,
|
||||
}
|
||||
|
||||
if (mNumFramesReceived > 0) {
|
||||
CHECK(timestampUs > mLastFrameTimestampUs);
|
||||
if (timestampUs <= mLastFrameTimestampUs) {
|
||||
CS_LOGE("Drop frame at %lld us, before last at %lld us",
|
||||
timestampUs, mLastFrameTimestampUs);
|
||||
releaseOneRecordingFrame(data);
|
||||
return;
|
||||
}
|
||||
if (timestampUs - mLastFrameTimestampUs > mGlitchDurationThresholdUs) {
|
||||
++mNumGlitches;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user