Bug 1261007 - part3: Remove the same/redundant code of checking the unique image. r=jolin
MozReview-Commit-ID: ByLCFShcN8q
--- a/dom/media/encoder/OmxTrackEncoder.cpp
+++ b/dom/media/encoder/OmxTrackEncoder.cpp
@@ -108,26 +108,22 @@ OmxVideoTrackEncoder::GetEncodedTrack(En
}
nsresult rv;
// Start queuing raw frames to the input buffers of OMXCodecWrapper.
VideoSegment::ChunkIterator iter(segment);
while (!iter.IsEnded()) {
VideoChunk chunk = *iter;
- // Send only the unique video frames to OMXCodecWrapper.
- if (mLastFrame != chunk.mFrame) {
- uint64_t totalDurationUs = mTotalFrameDuration * USECS_PER_S / mTrackRate;
- layers::Image* img = (chunk.IsNull() || chunk.mFrame.GetForceBlack()) ?
- nullptr : chunk.mFrame.GetImage();
- rv = mEncoder->Encode(img, mFrameWidth, mFrameHeight, totalDurationUs);
- NS_ENSURE_SUCCESS(rv, rv);
- }
+ uint64_t totalDurationUs = mTotalFrameDuration * USECS_PER_S / mTrackRate;
+ layers::Image* img = (chunk.IsNull() || chunk.mFrame.GetForceBlack()) ?
+ nullptr : chunk.mFrame.GetImage();
+ rv = mEncoder->Encode(img, mFrameWidth, mFrameHeight, totalDurationUs);
+ NS_ENSURE_SUCCESS(rv, rv);
- mLastFrame.TakeFrom(&chunk.mFrame);
mTotalFrameDuration += chunk.GetDuration();
iter.Next();
}
// Send the EOS signal to OMXCodecWrapper.
if (mEndOfStream && iter.IsEnded() && !mEosSetInEncoder) {
uint64_t totalDurationUs = mTotalFrameDuration * USECS_PER_S / mTrackRate;