mozilla::ipc::IPCResult
GMPVideoDecoderParent::RecvDecoded(const GMPVideoi420FrameData& aDecodedFrame)
{
  --mFrameCount;
  LOGV(("GMPVideoDecoderParent[%p]::RecvDecoded() timestamp=%" PRId64 " frameCount=%d",
    this, aDecodedFrame.mTimestamp(), mFrameCount));

  if (!mCallback) {
    return IPC_FAIL_NO_REASON(this);
  }

  if (!GMPVideoi420FrameImpl::CheckFrameData(aDecodedFrame)) {
    LOGE(("GMPVideoDecoderParent[%p]::RecvDecoded() "
          "timestamp=%" PRId64 " decoded frame corrupt, ignoring",
          this, aDecodedFrame.mTimestamp()));
    return IPC_FAIL_NO_REASON(this);
  }
  auto f = new GMPVideoi420FrameImpl(aDecodedFrame, &mVideoHost);

  // Ignore any return code. It is OK for this to fail without killing the process.
  mCallback->Decoded(f);

  return IPC_OK();
}
bool
GMPVideoDecoderParent::RecvDecoded(const GMPVideoi420FrameData& aDecodedFrame)
{
  --mFrameCount;
  LOGV(("GMPVideoDecoderParent[%p]::RecvDecoded() timestamp=%lld frameCount=%d",
    this, aDecodedFrame.mTimestamp(), mFrameCount));

  if (!mCallback) {
    return false;
  }

  if (!GMPVideoi420FrameImpl::CheckFrameData(aDecodedFrame)) {
    LOGE(("GMPVideoDecoderParent[%p]::RecvDecoded() "
       "timestamp=%lld decoded frame corrupt, ignoring"));
    return false;
  }
  auto f = new GMPVideoi420FrameImpl(aDecodedFrame, &mVideoHost);

  // Ignore any return code. It is OK for this to fail without killing the process.
  mCallback->Decoded(f);

  return true;
}